Hi,
I have wx.treeCtrl and following method which change image of the item.
def changeImageSuccess(self,text =“None”):
node = self.GetSelection()
if self.ItemHasChildren(node):
item,cookie = self.GetFirstChild(node,0)
while item.isOK():
print self.GetItemText(item)
if self.GetItemText(item) == text:
self.SetItemImage(item, “\image”, wx.TreeItemIcon_Normal)
item,cookie =self.GetNextChild(item, cookie)
else:
self.SetItemImage(self.selectedItem, “\image”, wx.TreeItemIcon_Normal)
Traceback (most recent call last):
File “/home/Set.py”, line 78, in changeImageSuccess
item,cookie = self.GetFirstChild(node,0)
File “/home/Python-2.7/lib/python2.7/site-packages/wxPython-src-3.0.0.0/wxPython/wx/_controls.py”, line 5389, in GetFirstChild
return controls.TreeCtrl_GetFirstChild(*args, **kwargs)
TypeError: TreeCtrl_GetFirstChild() takes at most 2 arguments (3 given)
Thanks and Regards
Hemadri