self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE
+ #| wxTR_HIDE_ROOT
, self.log)
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)
+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.
-
-"""