如何在窗口应用程序的c#中的Panel中添加滚动条 [英] How to add scroll bar in Panel in c# in window application

查看:372
本文介绍了如何在窗口应用程序的c#中的Panel中添加滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在窗口应用程序的c#中添加一个滚动条。



那么方法是什么。告诉我。

I want to add a scroll bar in Panel in c# in window application.

So what is the method. Tell me.

推荐答案

使用Autoscroll属性自定义面板 [ ^ ]可以帮到你。


我可以假设它是表格吗?



您不需要添加滚动条。他们已经在那里了。请看这里: http://msdn.microsoft.com/en-us/library /system.windows.forms.scrollablecontrol.aspx [ ^ ] - 你看,面板 ScrollableControl



要启用滚动面板内容,您只需使用以 AutoScroll ... 开头的5个属性。加载上面引用的帮助MSDN页面,单击每个属性并阅读这5个帮助页面。您还可以找到全面的代码示例。这个东西真的很简单。



祝你好运,

-SA
Can I assume it's Forms?

You don't need to add scroll bars. They are already there. Look here: http://msdn.microsoft.com/en-us/library/system.windows.forms.scrollablecontrol.aspx[^] — you see, Panel is ScrollableControl.

To enable scrolling of the content of the panel, all you need to do is using 5 properties starting with AutoScroll…. Load the help MSDN page referenced above, click on each of those properties and read these 5 help pages. You will also find comprehensive code samples. This stuff is really pretty simple.

Good luck,
—SA

只是一行





panel1.AutoScroll = true;
just it's a one line


panel1.AutoScroll = true;


这篇关于如何在窗口应用程序的c#中的Panel中添加滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆