git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37949
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
lb.SetSelection(0)
self.lb = lb
lb.SetSelection(0)
self.lb = lb
+ lb.Bind(wx.EVT_RIGHT_DOWN, self.OnDoHitTest)
+
pos = lb.GetPosition().x + lb.GetSize().width + 25
btn = wx.Button(self, -1, "Test SetString", (pos, 50))
self.Bind(wx.EVT_BUTTON, self.OnTestButton, btn)
pos = lb.GetPosition().x + lb.GetSize().width + 25
btn = wx.Button(self, -1, "Test SetString", (pos, 50))
self.Bind(wx.EVT_BUTTON, self.OnTestButton, btn)
def OnTestButton(self, evt):
self.lb.SetString(4, "FUBAR")
def OnTestButton(self, evt):
self.lb.SetString(4, "FUBAR")
+ def OnDoHitTest(self, evt):
+ item = self.lb.HitTest(evt.GetPosition())
+ self.log.write("HitTest: %d\n" % item)
+
#----------------------------------------------------------------------
def runTest(frame, nb, log):
#----------------------------------------------------------------------
def runTest(frame, nb, log):