def __init__(self, *args, **kwargs): wx.stc.StyledTextCtrl.__init__(self, *args, **kwargs) self.Bind(wx.EVT_MOTION, self.OnMotion)