Board index » delphi » How to hide scrollbars and still support scrolling?

How to hide scrollbars and still support scrolling?

Can't seem to hide a control's scrollbars and still support scrolling:

When developing a Dephi application for a touch screen, the scrollbars
typically eat up too much screen real estate, so scrolling via "Up" and
"Down" buttons is preferred.

Yet, hiding the scrollbars of a TScrollBox prevents the ScrollInView( ) from
working, and setting  "ScrollBox1.VertScrollBar.Size := 0" causes the
scrollbar to size itself to the default size, instead of making the
scrollbar disappear.

Note: Setting "ScrollBox1.VertScrollBar.Size := 999", or some number larger
than the ScrollBox1.Width will work on Windows 2000, with the scrollbar
disappearing yet the ScrollInView( ) functionality is not affected, however,
this does not appear to work under XP.  In fact, changing
"ScrollBox1.VertScrollBar.Size" appears to have NO effect under XP!

Does anyone have any suggestions for supporting scrolling (programatically)
without displaying a control's scrollbar?

Thanks in advance,
- Todd.

 

Re:How to hide scrollbars and still support scrolling?


Quote
In article <3e88464...@newsgroups.borland.com>, Todd Schneider wrote:
> Can't seem to hide a control's scrollbars and still support scrolling:

> When developing a Dephi application for a touch screen, the scrollbars
> typically eat up too much screen real estate, so scrolling via "Up" and
> "Down" buttons is preferred.

> Yet, hiding the scrollbars of a TScrollBox prevents the ScrollInView( ) from
> working, and setting  "ScrollBox1.VertScrollBar.Size := 0" causes the
> scrollbar to size itself to the default size, instead of making the
> scrollbar disappear.

Well, the obvious thing to try is a size of 1, no? Seems to work on Win2K at
least. Another option is the hoary old panel trick: drop the scrollbox on a
panel, align it to client, change the align back to alNone, increase width and
height of the scrollbox by the size of the scrollbars. Effect: scrollbars are
outside the panels client area and clipped from view.

--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Other Threads