TreeView customization
-
Is there a way to change the default node class type used by a TreeView control? I would like the TreeView to operate normally, but instead of creating TreeViewNode objects, to create MyTreeViewNode objects. I would like the node to expose an additional attribute. class MyTreeViewNode: TreeViewNode { public string ExtendedProperty { get { } } }
-
Is there a way to change the default node class type used by a TreeView control? I would like the TreeView to operate normally, but instead of creating TreeViewNode objects, to create MyTreeViewNode objects. I would like the node to expose an additional attribute. class MyTreeViewNode: TreeViewNode { public string ExtendedProperty { get { } } }
astibich2 wrote:
Is there a way to change the default node class type used by a TreeView control?
If I remember correctly, the answer is NO.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
Is there a way to change the default node class type used by a TreeView control? I would like the TreeView to operate normally, but instead of creating TreeViewNode objects, to create MyTreeViewNode objects. I would like the node to expose an additional attribute. class MyTreeViewNode: TreeViewNode { public string ExtendedProperty { get { } } }
You'll need to create your own MyTreeView that takes your TreeNode Type in place of the System.Windows.Forms one by creating the new properties and methods you need and hiding the old ones, as well as creating MyTreeNodeCollection etc... Then you can just use your MyTreeview instead.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)