Don't need to adjust the position for HitTest any longer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
aa2e1f3d44
commit
44b8f8e051
@ -82,18 +82,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)
|
||||
|
||||
|
||||
def OnSize(self, evt):
|
||||
self.tree.SetSize(self.GetSize())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user