需要帮助使用VS2010在Windows窗体中实现Splitter [英] Need help to impliment Splitter in windows form using VS2010

查看:99
本文介绍了需要帮助使用VS2010在Windows窗体中实现Splitter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在表单中使用拆分器,其中包含使用组框的两个不同信息。

Splitter.Pane11包含groupbox1第二个Panle2 splitter.panel2包含另一个groupbox2。

两个组框都包含其他控件,如文本框,网格和button.etc ..



如果我们最大化或重新调整窗体或分割器面板的大小,我无法根据组或拆分器大小调整其他控件大小。我检查了锚定属性,但我没有在最大化模式下获得滚动属性。



如果用户双击Splitter,它将扩展Splitter.Pane11并再次双击崩溃Splitter.Pane11。



请帮我解决这个问题。



提前谢谢。

Hi all,

I am using splitter in form which contain two different information using group boxes.
Splitter.Pane11 contains groupbox1 and second Panle2 splitter.panel2 contains another groupbox2.
both group box contains other controls like text box, grid and button.etc..

If we maximize or re-size the form or splitter panels I am not able to re size other controls size depending on group or Splitter size.I checked with anchoring property but I am not getting scrolling property in maximize mode.

And also if user double clicks on Splitter then it will expand the Splitter.Pane11 and again double click collapse the Splitter.Pane11.

Please help me to solve this problem.

Thanks in advance.

推荐答案

是否使用锚定或停靠属性,以调整控件中包含的控件的大小,这些控件还需要设置其锚定/停靠属性,或者您需要覆盖受影响容器的OnResize事件,并手动调整该方法中控件的大小和位置。我建议大多数布局可以使用锚和对接属性的正确设置来实现。从维护的角度来看,手动调整方法覆盖中的内容可能非常困难和困难。
Whether using anchoring or docking properties, in order to resize the controls contained in the controls, those controls also need to either have their anchoring/docking properties set, or you need to override the OnResize event for the affected container and manually adjust the sizes and positions of your controls in that method. I would suggest that most layouts can be achieved using proper setup of the anchor and docking properties. Manually adjusting stuff in the method override can be very problematic and difficult from a maintenance standpoint.


这篇关于需要帮助使用VS2010在Windows窗体中实现Splitter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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