[Python.NET] binding python objects to treenodes

Previous Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Python.NET] binding python objects to treenodes


Is there a way to bind a python object to a treeView node? I have the following
treenode based class:

class dataNode(WinForms.TreeNode):

     def __init__(self,name,total):
         self.Text = name
         self.Total = total

And I add the node as such:


But when I try and access the attributes it doesn't work?

    for node in self.treeView1.Nodes:
       print node.Total

Or should I keep the nodes in a list and access by index?

Any help appeciated.


Python.NET mailing list - [hidden email]