views:

434

answers:

1

Title says it all...is there a way for me to check if the Scrollbar for a control is currently displayed or not? I want to use it so I can determine how to size the children of the Scrollable control, which is somewhat dependent on whether or not the ScrollBar is displayed (the Scrollable control can be dynamically resized).

+2  A: 

For controls with the AutoScroll property try the HorizontalScroll and VerticalScroll Visible properties:

// Checks horizontal scrollbar visibity.
yourScrollableControl.HorizontalScroll.Visible;

// Checks horizontal scrollbar visibity.
yourScrollableControl.VerticalScroll.Visible;
Jay Riggs