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?
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.
精彩评论