积极答复者
TreeView怎样使其中某个子节点变成不可以操作类似于disable

问题
答案
-
你好 Caiyao,
其实你可以动态的设置TreeView的LabelEdit属性来达到Enable/Disable读写的目的。你可以抓NodeMouseClick事件,然后根据点击的那个Node属性来设置LabelEdit,这样很方便。当LableEdit为False时不能编辑(整棵树都不能编辑),当LabelEdit为True时能编辑(整棵树都能)。这个方法应该很有效吧。
Sincerely,
Kira Qian
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- 已标记为答案 feiyun0112Moderator 2010年1月21日 9:34
全部回复
-
你好 Caiyao,
其实你可以动态的设置TreeView的LabelEdit属性来达到Enable/Disable读写的目的。你可以抓NodeMouseClick事件,然后根据点击的那个Node属性来设置LabelEdit,这样很方便。当LableEdit为False时不能编辑(整棵树都不能编辑),当LabelEdit为True时能编辑(整棵树都能)。这个方法应该很有效吧。
Sincerely,
Kira Qian
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- 已标记为答案 feiyun0112Moderator 2010年1月21日 9:34