简体   繁体   English

在DockPanel Suite中添加可滚动面板

[英]Add scrollable panels in the DockPanel Suite

I am trying to add scroll bars to a panel using the WeiFen Luo Dock Panel Suite (DPS). 我正在尝试使用WeiFen Luo Dock面板套件(DPS)向面板添加滚动条。 I have my forms created and the layout is how I want it, however one of my forms is larger than the area I have allocated for one group of panels. 我已经创建了表单,并且布局是我想要的,但是其中一个表单大于为一组面板分配的面积。 Scroll bars on the panel seem like the most logical option, but I cannot get them to be enabled for the form. 面板上的滚动条似乎是最合乎逻辑的选项,但是我无法为表单启用滚动条。

I tried setting AutoScroll to True, but this changed nothing. 我尝试将AutoScroll设置为True,但这并没有改变。 I then added a minimum size constraint, but this caused the panel to show behind other panels and other docking instabilities. 然后,我添加了最小尺寸限制,但是这导致面板显示在其他面板后面以及其他停靠不稳定性中。 Is this a bug, or perhaps am I going about this the wrong way? 这是一个错误,还是我会以错误的方式进行操作?

So, you just need to set AutoScroll to True and then define an AutoScrollMinSize. 因此,您只需要将AutoScroll设置为True,然后定义一个AutoScrollMinSize。 Note that there seems to be a bug if you do not make the panel large enough to negate the need for scroll bars in the designer. 请注意,如果您没有将面板做得足够大以至于无法在设计器中消除对滚动条的需求,则似乎存在一个错误。 The bug causes the window to resize in the designer at run-time (In VS 2012 and VS Community 2013). 该错误导致在运行时在设计器中调整窗口的大小(在VS 2012和VS Community 2013中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM