Scrolling panel using horizontal scroll bar

2019-07-06 20:55发布

How can I apply a horizontal scroll bar to a Panel?

I'm working on 2d tiled map editor and I'm using a Panel to hold the contents. When my map is bigger than my panel it just goes off and becomes invisible, would it be possible to apply custom scroll bars?

2条回答
SAY GOODBYE
2楼-- · 2019-07-06 21:20

While this no longer applies as the question has been clarified to target winforms, in Web Forms you can set the ScrollBars property to ScrollBars.Horizontal.

查看更多
乱世女痞
3楼-- · 2019-07-06 21:46

The Panel is derived from ScrollableControl. So there is a property AutoScroll. Just set it to true and the rest will be done automagically.

查看更多
登录 后发表回答