Add Horizontal Scrollbar for Panel

余生颓废 提交于 2019-12-12 03:42:12

问题


How i Can Add Horizontal scrollbar for panel , i tried to make AutoScroll property to True , but this just show the vertical Scrollbar.

what i want is when the client minimize the form a Horizontal Scrollbar appear so he can see all the controls in panel, I'm using form without borders.

Maximize `Form :

Minimize 'form':


回答1:


Try setting programmatically the panel box properties:

panel.Autoscroll = True panel.VerticalScroll.Visible = True panel.HorizontalScroll.Visible = True

Try adjusting your panel size then don't adjust the size of width of each data inside of it. I suppose it is because the data is EXACTLY fitted on your panel box.




回答2:


Try looking in the Panel properties. There you can see the AutoScroll property. The AutoScroll property:

Indicates whether scroll bars automatically appear when the control contents are larger than its visible area.

BUT, if your data inside the Panel is EXACT, horizontal scroll bar or vertical scrollbar will not appear in your Panel.



来源:https://stackoverflow.com/questions/40230238/add-horizontal-scrollbar-for-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!