X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33328cd8828baafa97e8623e005b471486b61cc7..d38f70b2494626c4c04dbec17b48d1029b7bcd10:/wxPython/demo/TreeListCtrl.py diff --git a/wxPython/demo/TreeListCtrl.py b/wxPython/demo/TreeListCtrl.py index f0de0e1e90..6501392437 100644 --- a/wxPython/demo/TreeListCtrl.py +++ b/wxPython/demo/TreeListCtrl.py @@ -14,7 +14,8 @@ class TestPanel(wx.Panel): self.tree = gizmos.TreeListCtrl(self, -1, style = wx.TR_DEFAULT_STYLE - #wx.TR_TWIST_BUTTONS + #| wx.TR_HAS_BUTTONS + #| wx.TR_TWIST_BUTTONS #| wx.TR_ROW_LINES #| wx.TR_COLUMN_LINES #| wx.TR_NO_LINES @@ -74,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)