Winform中的设计问题 [英] Design Problem in winform

查看:84
本文介绍了Winform中的设计问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须像这样设计表格
1.表单的左侧包含一个TreeView
2.在选择不同的树节点时,我想在屏幕右侧打开不同的表单
我应该使用哪个控件.
拆分器控件没有用,我无法在拆分器控件中打开表单
是否存在像控件这样的FRAMESET(Web开发中的Frameset标签)?这样我就可以在其中打开表格
还有其他方法吗?

感谢advnace
Manavya2006

Hi All,

I have to design form like
1. Left side of form contains a TreeView
2. On selection of different tree nodes, i want to open different forms on right side of the screen
Which control should i use.
Splitter control is not useful, i cannot open forms in splitter control
is there FRAMESET(Frameset tag in web debelopment) like control exist ? so that i can open forms in it
Any other way ?

Thanks in advnace
Manavya2006

推荐答案

使用SplitContainer.它允许您垂直或水平拆分表单,并且可以从包含容器的表单中获取拆分器容器内的任何控件.

然后,您可以将树控件放在一个面板中,将其他控件放在另一个面板中.
Use a SplitContainer. It allows you to split the form vertically or horizontally, and you can get to any control inside the splitter container from the form that contains the container.

You can then put the tree control in one panel, and something else in the other panel.


不要在右侧打开表单",而是加载面板(实际上是您可以只使用Control).如果您使用可视化IDE创建右面板,则将其设计为用户控件,然后可以将其添加到SplitContainer的右面板中,并在选择了相关树节点时将其停靠栏设置为Fill.
Don''t open ''forms'' on the right side, load panels (in fact you can probably just use Control). Design your right panels as user controls if you are using a visual IDE to create them, and then you can add them to the right panel of a SplitContainer and set their dock to Fill when the relevant tree node is selected.


使用类似 AvalonDock [ ^ ].

Windows窗体可能有类似的库,可能:
Visual Studio IDE(如Dock容器) [
Use something like AvalonDock[^].

There are similar libraries available for Windows Forms, perhaps:
Visual Studio IDE like Dock Container[^]

Best regards
Espen Harlinn


这篇关于Winform中的设计问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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