winform中的树视图控件 [英] treeview control in winform
本文介绍了winform中的树视图控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个树视图控件并用数据填充它。
Tree有一些父节点和子节点。我想为这个控件编写一个验证函数。当我选择父控件时,一个也必须选择子节点。如果选择子节点,也应选择其父节点。
解决方案
检查此链接可能会对您有所帮助:
http: //msdn.microsoft.com/en-us/library/system.windows.forms.treeview.aftercheck.aspx [ ^ ]
http://forums.asp.net/t/1058646.aspx/1 [ ^ ]
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/ fd306556-5551-42f8-b3b7-843f182c2c85 / [ ^ ]
你不应该尝试这样做,这从来没用过,只会混淆用户。如果您使用System.Windows.Forms.TreeView
,则不支持多项选择。
-SA
I Have created a treeview control and populated it with data.
Tree has some parent and child nodes.I want to write a validation function for this control.When i select the parent control ,one child node must also be selected.if i select the child node ,its parent node should also be selected.
解决方案
Check this links it might help you out:
http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.aftercheck.aspx[^]
http://forums.asp.net/t/1058646.aspx/1[^]
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/fd306556-5551-42f8-b3b7-843f182c2c85/[^]
You should not try do to this, this is never useful and would only confuse the users. If you are usingSystem.Windows.Forms.TreeView
, multiple selection is not supported.
—SA
这篇关于winform中的树视图控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文