简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM