binding python objects to treenodes

Sept. 11, 2005
5:38 a.m.
Hello, 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: self.treeView1.Nodes.Add(dataNode("testnode",3)) 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. Guy
7108
Age (days ago)
7108
Last active (days ago)
0 comments
1 participants
participants (1)
-
Guy Robinson