views:

73

answers:

1

Having a custom control deriving from ScrollableControl and using AutoScrollMinSize to set the inner display bigger than the viewport, the horizontal scrollbar shows as expected.

However, sometimes I want the inner display smaller than the viewport but the horizontal scrollbar disappears. I know that's the expected behavior but what I would like is for the scrollbar to be there but kind of disabled or full.

Is there a way to achieve this?

A: 

You could make a panel or label that is 1 pixel wider than your ScrollableControl, anchor it to the right and left so that it stays wider, and make it 0 or 1 pixels tall so that people don't notice it. It's an ugly hack, but it should work.

SLaks
I fail to see how that would help. :(
Stecy
It will ensure that there is always a control wider than the ScrollableControl. Therefore, there will always be a scrollbar.
SLaks