x = self.xoffset
for i, token in enumerate(self.__tokens):
text = self.get_text(i, i+1)
x += self.GetTextExtent(text)[0]
if x > pos:
if isinstance(token, self.MetadataToken):
return i
if pos - last > x-pos:
After Change
event.Skip()
def hit_test(self, pos):
text = self.get_text(0, len(self.__tokens))
dc = wx.ClientDC(self)
dc.Font = self.Font
positions = self.get_positions(dc)
del dc