controls/CustomStyledTextCtrl.py
changeset 1735 c02818d7e29f
parent 1511 91538d0c242c
child 1736 7e61baa047f0
equal deleted inserted replaced
1734:750eeb7230a1 1735:c02818d7e29f
    80             return i + 1
    80             return i + 1
    81     else:
    81     else:
    82         return None
    82         return None
    83 
    83 
    84 class CustomStyledTextCtrl(wx.stc.StyledTextCtrl):
    84 class CustomStyledTextCtrl(wx.stc.StyledTextCtrl):
    85     
    85 
    86     def __init__(self, *args, **kwargs):
    86     def __init__(self, *args, **kwargs):
    87         wx.stc.StyledTextCtrl.__init__(self, *args, **kwargs)
    87         wx.stc.StyledTextCtrl.__init__(self, *args, **kwargs)
    88         
    88 
    89         self.Bind(wx.EVT_MOTION, self.OnMotion)
    89         self.Bind(wx.EVT_MOTION, self.OnMotion)
    90         
    90 
    91     def OnMotion(self, event):
    91     def OnMotion(self, event):
    92         if wx.Platform == '__WXMSW__':
    92         if wx.Platform == '__WXMSW__':
    93             if not event.Dragging():
    93             if not event.Dragging():
    94                 x, y = event.GetPosition()
    94                 x, y = event.GetPosition()
    95                 margin_width = reduce(
    95                 margin_width = reduce(