- self.SetItemHasChildren(self.root, wx.True)
- wx.EVT_TREE_ITEM_EXPANDING(self, self.GetId(), self.OnItemExpanding)
- wx.EVT_TREE_ITEM_COLLAPSED(self, self.GetId(), self.OnItemCollapsed)
- wx.EVT_TREE_SEL_CHANGED(self, self.GetId(), self.OnSelChanged)
+ self.SetItemHasChildren(self.root, True)
+
+ self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.OnItemExpanding, id=self.GetId())
+ self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed, id=self.GetId())
+ self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged, id=self.GetId())
+