I have a problem with adding new item and filling it with any data in each column
self.List_Category=wx.gizmos.TreeListCtrl(self,)
self.List_Category.AddColumn ('Code', width=100)
self.List_Category.AddColumn ('Name', width=150)
self.List_Category.AddColumn('id', width=0)
self.List_Category.AddColumn('parent_id', width=0)
self.List_Category.SetColumnWidth(2, 0)
self.List_Category.SetColumnWidth(3, 0)
self.rootrow_CategoryList = self.List_Category.AddRoot('Categories')
self.UpdateCategoryList()
def UpdateCategoryList(self):
self.List_Category.DeleteAllItems()
result= sqlop.getSelectList('select code,name,id,parent_id from ProductCategories',())
for d_row in result:
New_item=self.List_Category.AppendItem(self.rootrow_CategoryList, '1')
code=d_row[0]
name=d_row[1]
id_cat=d_row[2]
parent_id=d_row[3]
self.List_Category.SetItemText(New_item, code,0)
self.List_Category.SetItemText(New_item, name,1)
self.List_Category.SetItemText(New_item,id_cat,2)
self.List_Category.SetItemText(New_item, parent_id,3)
self.List_Category.Refresh()
where self.List_Category.SetItemText call exception ‘Use SetItem instead’ and after running no rows added in the shown form. Can anybody help? I need multicolumn treelist widget in my gui to make treeview list.