The ScrollableControl class has 2 protected boolean properties: HScroll and VScroll.
As the document says:
Gets or sets a value indicating whether the horizontal scroll bar is visible.
And
AutoScroll maintains the visibility of the scrollbars automatically. Therefore, setting the HScroll or VScroll properties to true have no effect when AutoScroll is enabled.
So I use them like this, but the scrollbar isn't showed:
class MyScrollableControl : ScrollableControl {
public MyScrollableControl() {
this.AutoScroll = false;
this.HScroll = true;
}
}
If I use the following code, it works:
this.HorizontalScroll.Visible = true;
When I put them torgether, the scrollbar is still invisible, and the values of HScroll and HorizontalScroll.Visible keep False.
this.AutoScroll = false;
this.HScroll = true;
this.HorizontalScroll.Visible = true;
So what is the real use of HScroll and VScroll ?
Update
My code and test