X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ecc08ead918856a70559204f9b5daacc49385eaa..521a2cb15495224d42df6116f93049800595a7ba:/wxPython/demo/wxTreeCtrl.py diff --git a/wxPython/demo/wxTreeCtrl.py b/wxPython/demo/wxTreeCtrl.py index 03a346d05f..ed5adc05e6 100644 --- a/wxPython/demo/wxTreeCtrl.py +++ b/wxPython/demo/wxTreeCtrl.py @@ -31,6 +31,7 @@ class TestTreeCtrlPanel(wxPanel): self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE + #| wxTR_HIDE_ROOT , self.log) @@ -80,15 +81,15 @@ class TestTreeCtrlPanel(wxPanel): EVT_RIGHT_UP(self.tree, self.OnRightUp) + def OnRightClick(self, event): pt = event.GetPosition(); item, flags = self.tree.HitTest(pt) - self.log.WriteText("OnRightClick: %s, %s\n" % (self.tree.GetItemText(item), - type(item))) + self.log.WriteText("OnRightClick: %s, %s, %s\n" % + (self.tree.GetItemText(item), type(item), item.__class__)) self.tree.SelectItem(item) - def OnRightUp(self, event): pt = event.GetPosition(); item, flags = self.tree.HitTest(pt) @@ -165,15 +166,15 @@ def runTest(frame, nb, log): +overview = """\ +A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles. +""" +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) - - - -overview = """\ -A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles. - -"""