如何在Windows窗体应用程序中使用许多控件向Panel控件添加滚动条?

时间:2022-01-21 15:49:57

How do you add a scrollbar to a Panel control with many controls in windows form application?

如何在Windows窗体应用程序中使用许多控件向Panel控件添加滚动条?

2 个解决方案

#1


Just set the AutoScroll property of your Panel to true and it will handle adding the scrollbars for you.

只需将Panel的AutoScroll属性设置为true,它就会处理为您添加滚动条。

this.panel1.AutoScroll = true;

#2


Create An Event on the Panel you want scroll Then.

在面板上创建要滚动的事件然后。

this.panel1.AutoScroll = true;

Note: panel1=panel Name

注意:panel1 =面板名称

#1


Just set the AutoScroll property of your Panel to true and it will handle adding the scrollbars for you.

只需将Panel的AutoScroll属性设置为true,它就会处理为您添加滚动条。

this.panel1.AutoScroll = true;

#2


Create An Event on the Panel you want scroll Then.

在面板上创建要滚动的事件然后。

this.panel1.AutoScroll = true;

Note: panel1=panel Name

注意:panel1 =面板名称