X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55bd43d245d26a35c4f942e33c7cf4ef7405fbfc..ff1dadae388b2f408874b80251d64d16d9d46280:/wxPython/demo/TreeListCtrl.py

diff --git a/wxPython/demo/TreeListCtrl.py b/wxPython/demo/TreeListCtrl.py
index 327a238b7c..c5371334a2 100644
--- a/wxPython/demo/TreeListCtrl.py
+++ b/wxPython/demo/TreeListCtrl.py
@@ -14,16 +14,19 @@ 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 
-                                        | wx.TR_FULL_ROW_HIGHLIGHT     
+                                        | wx.TR_FULL_ROW_HIGHLIGHT
                                    )
+
         isz = (16,16)
         il = wx.ImageList(isz[0], isz[1])
         fldridx     = il.Add(wx.ArtProvider_GetBitmap(wx.ART_FOLDER,      wx.ART_OTHER, isz))
         fldropenidx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_FILE_OPEN,   wx.ART_OTHER, isz))
-        fileidx     = il.Add(wx.ArtProvider_GetBitmap(wx.ART_REPORT_VIEW, wx.ART_OTHER, isz))
+        fileidx     = il.Add(wx.ArtProvider_GetBitmap(wx.ART_NORMAL_FILE, wx.ART_OTHER, isz))
         smileidx    = il.Add(images.getSmilesBitmap())
 
         self.tree.SetImageList(il)
@@ -75,17 +78,11 @@ class TestPanel(wx.Panel):
 
 
     def OnRightUp(self, evt):
-        # Convert the position from being relative to the subwindow to
-        # being relative to the outer treelist window so HitTest will
-        # have the point it is expecting.
         pos = evt.GetPosition()
-        pos = self.tree.GetMainWindow().ClientToScreen(pos)
-        pos = self.tree.ScreenToClient(pos)
         item, flags, col = self.tree.HitTest(pos)
-
         if item:
-            print flags, col, self.tree.GetItemText(item, col)
-
+            self.log.write('Flags: %s, Col:%s, Text: %s' %
+                           (flags, col, self.tree.GetItemText(item, col)))
 
     def OnSize(self, evt):
         self.tree.SetSize(self.GetSize())