binding python objects to treenodes
11 Sep
2005
11 Sep
'05
12:38 p.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
7046
Age (days ago)
7046
Last active (days ago)
0 comments
1 participants
participants (1)
-
Guy Robinson