TreeView节点添加和删除事件 [英] TreeView Node Added and Removed Event

查看:140
本文介绍了TreeView节点添加和删除事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个继承TreeView的自定义TreeView控件.当从TreeView添加节点或从中删除节点时,我需要执行一些操作,但是看不到事件,甚至我可以重写以实现此目的的受保护TreeView函数.我想念什么吗?看来这将是人们普遍使用的通知.或者,如果不存在,是否有人知道解决方法?例如,当添加或删除节点时,有另一个事件可以触发.感谢任何帮助.


.NET Developer

I am creating a custom TreeView control that inherits TreeView.  I need to perform some actions when nodes are added or removed from the TreeView but don't see an event, or even a protected TreeView function that I can override to accomplish this.  Am I missing something?  It seems like this would be a notification that people would commonly use.  Or if it doesn't exist, does anyone know of a workaround??  For example is there another event I can listen to that gets fired when nodes are added or removed.  Any help is appreciated.


.NET Developer

推荐答案

ControlAdded和ControlRemoved应该是您想要的.
ControlAdded and ControlRemoved should be what you are looking for.


这篇关于TreeView节点添加和删除事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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