Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check is TScrollBox scrollbars are actually visible

I have a simple sizable form with TScrollBox (Align := alClient) and some controls put on TScrollBox. If user change the form size, TScrollBox show and hide the HorzScrollBar and VertScrollBar (depend on actual client form size).

How to check at run-time - does HorzScrollBar or VertScrollBar are visible right now?

TControlScrollBar.Visible is not an answer, because it hase a regulating function only.

like image 861
Y.N Avatar asked Sep 18 '15 06:09

Y.N


1 Answers

Use TControlScrollBar.IsScrollBarVisible to test this.

Call IsScrollBarVisible to determine whether the scroll bar is visible. IsScrollBarVisible returns true if the Visible property is true and the associated scrolling windowed control contains child controls that lie within Margin pixels from the edge.

like image 157
David Heffernan Avatar answered Oct 15 '22 00:10

David Heffernan