Board index » delphi » How to scroll a Scrollbox without the scrollbars being visible

How to scroll a Scrollbox without the scrollbars being visible

using Delphi 6 pro and WinXP,
How do I scroll a scrollbox when the scrollbars are not visible, as in code?
I do not want the scrollbars displayed yet I want to be able to scroll the
scrollbox.
What happens is when the scrollbars are visible, changing their Position
properties scolls the scrollbox like normal, but when I set the scrollbar's
Visible property to False, changing the Position property does nothing at
all.
Can anyone help?
Thanks,

Gino Costa
Programmer, Matrix Games www.matrixgames.com
Check out current project at
http://www.matrixgames.com/Games/EuropaFleetActions/ and the forum at:
http://www.matrixgames.com/forums/forumdisplay.php?s=&forumid=56

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 

Re:How to scroll a Scrollbox without the scrollbars being visible


If you mean a TMemo, you can use Windows messages to scroll it up and
down.
Quote
<gco...@beld.net> wrote:
>using Delphi 6 pro and WinXP,
>How do I scroll a scrollbox when the scrollbars are not visible, as in code?
>I do not want the scrollbars displayed yet I want to be able to scroll the
>scrollbox.
>What happens is when the scrollbars are visible, changing their Position
>properties scolls the scrollbox like normal, but when I set the scrollbar's
>Visible property to False, changing the Position property does nothing at
>all.
>Can anyone help?
>Thanks,

>Gino Costa
>Programmer, Matrix Games www.matrixgames.com
>Check out current project at
>http://www.matrixgames.com/Games/EuropaFleetActions/ and the forum at:
>http://www.matrixgames.com/forums/forumdisplay.php?s=&forumid=56

>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
>-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

Re:How to scroll a Scrollbox without the scrollbars being visible


TWinControl.ScrollBy seems like a good place to start.

Cheers

Quote
"Gino Costa" <gco...@beld.net> wrote:

I mean an actual TScrollBox component. I can't there is no good way to
scroll one horizintally or vertically when the scrollbars are not
visible.
Quote
>using Delphi 6 pro and WinXP,
>How do I scroll a scrollbox when the scrollbars are not visible, as in code?
>I do not want the scrollbars displayed yet I want to be able to scroll the
>scrollbox.
>What happens is when the scrollbars are visible, changing their Position
>properties scolls the scrollbox like normal, but when I set the scrollbar's
>Visible property to False, changing the Position property does nothing at
>all.
>Can anyone help?
>Thanks,

>Gino Costa
>Programmer, Matrix Games www.matrixgames.com
>Check out current project at
>http://www.matrixgames.com/Games/EuropaFleetActions/ and the forum at:
>http://www.matrixgames.com/forums/forumdisplay.php?s=&forumid=56

>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
>-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

Re:How to scroll a Scrollbox without the scrollbars being visible


"Richard C Haven" <rha...@santacruz.com> wrote in message
news:t2hpsu0dvr6di9d7gb3066v7bp5j3po3c9@4ax.com...

Quote
> TWinControl.ScrollBy seems like a good place to start.

> Cheers

> "Gino Costa" <gco...@beld.net> wrote:

> I mean an actual TScrollBox component. I can't there is no good way to
> scroll one horizintally or vertically when the scrollbars are not
> visible.

> >using Delphi 6 pro and WinXP,
> >How do I scroll a scrollbox when the scrollbars are not visible, as in
code?
> >I do not want the scrollbars displayed yet I want to be able to scroll
the
> >scrollbox.
> >What happens is when the scrollbars are visible, changing their Position
> >properties scolls the scrollbox like normal, but when I set the
scrollbar's
> >Visible property to False, changing the Position property does nothing at
> >all.
> >Can anyone help?
> >Thanks,

OP gone AWOL

Why a scrollbox without scrollbars? Won't a panel do?

without the bars you won't get some user wheelmouse etc actions
or other scrolling actions,  they act wrt the bars not the box

cat.skin:=false;

put a scrollbox inside a panel sized so the bars don't show
make the panel borderstyle single, so it looks like a scrollbox

scrollbox.VertScrollBar.Position:=y;

you may also need the autoscroll property, to force the bars

be aware scrollboxes are not a virtual  screen
not an infinite viewplane
not a complete window manager, mostly useful

Other Threads