HitTest and HitTestXY for wxListBox This experimental code shows how to implement a working HitTestXY method for wxListBox {{{ #!python class MyListBox(wx.ListBox): def HitTestXY(self,x,y): xs,ys = self.GetClientSize() if (y<0) or (x<0) or (x>=xs) or (y>=ys): return -1 index = self.GetScrollPos(wx.VERTICAL) + y/self.GetCharHeight() if index >= self.GetCount(): return -1 return index def HitTest(self,pos): return self.HitTestXY(*pos) }}}