tosberg Posted December 11, 2003 Posted December 11, 2003 Does anybody know how a TreeNode knows when it has been added to a TreeView? How do you think .NET does it behind the scenes? I need to know this for a class I am making but there are no events that let me know when the TreeView property of a Node turns from Nothing into an actual TreeView. Any suggestions or even a point in the right direction would be great! Quote
*Gurus* divil Posted December 11, 2003 *Gurus* Posted December 11, 2003 It turns when it gets added. It's done internally, and is a very common practice when adding objects to collections. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
tosberg Posted December 11, 2003 Author Posted December 11, 2003 But how does it know when it has been added? Does the treenode collection tell the node a treeview is present? How does the Treenode Detect that a Treeview is now present? Does the Treeview set it? That's what i'm trying to find out. How do you think the internals set it? At some point, something has to notify the Node that it has been added to a collection that is part of a treeview. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.