controls/CustomStyledTextCtrl.py
changeset 1878 fb73a6b6622d
parent 1847 6198190bc121
child 1881 091005ec69c4
equal deleted inserted replaced
1877:da5f1fa46f2b 1878:fb73a6b6622d
    95     def OnMotion(self, event):
    95     def OnMotion(self, event):
    96         if wx.Platform == '__WXMSW__':
    96         if wx.Platform == '__WXMSW__':
    97             if not event.Dragging():
    97             if not event.Dragging():
    98                 x, _y = event.GetPosition()
    98                 x, _y = event.GetPosition()
    99                 margin_width = reduce(
    99                 margin_width = reduce(
   100                         lambda x, y: x + y,
   100                     lambda x, y: x + y,
   101                         [self.GetMarginWidth(i)
   101                     [self.GetMarginWidth(i) for i in xrange(3)],
   102                          for i in xrange(3)],
   102                     0)
   103                         0)
       
   104                 if x <= margin_width:
   103                 if x <= margin_width:
   105                     self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
   104                     self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
   106                 else:
   105                 else:
   107                     self.SetCursor(wx.StockCursor(wx.CURSOR_IBEAM))
   106                     self.SetCursor(wx.StockCursor(wx.CURSOR_IBEAM))
   108             else:
   107             else: