diff --git a/wxPython/demo/TreeListCtrl.py b/wxPython/demo/TreeListCtrl.py index c5371334a2..6501392437 100644 --- a/wxPython/demo/TreeListCtrl.py +++ b/wxPython/demo/TreeListCtrl.py @@ -75,8 +75,13 @@ class TestPanel(wx.Panel): self.tree.Expand(self.root) self.tree.GetMainWindow().Bind(wx.EVT_RIGHT_UP, self.OnRightUp) + self.tree.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnActivate) + def OnActivate(self, evt): + self.log.write('OnActivate: %s' % self.tree.GetItemText(evt.GetItem())) + + def OnRightUp(self, evt): pos = evt.GetPosition() item, flags, col = self.tree.HitTest(pos)