|
-
January 3rd, 2003, 03:42 AM
#1
bind a treenode text property to a treenode TAG property, Quickly please
Hey
I have e treeview with a lot of nodes. each node has a tag object. the object has a Name property which set/get a string. Now I want to bind the nodes.Text to the TAG's Name property, but how??? is it possible
-
January 3rd, 2003, 05:40 AM
#2
Yes it is...
Add variable (say ParentNode) which will point to the TreeNode into the class of the object you are assigning to the Tag proprerty of the TreeNode. Initialy set it to null.
Create Name property it that class and during the setting its value set also the Text property of the TreeNode where the ParentNode property points.
Derive your own TreeNodeEx class from the .net framework's TreeNode.
Override property Tag and during the setting that property set also the Text property to the value of the Name property of the object...
Martin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|