def __init__(self, grid): wx.EvtHandler.__init__(self) self.grid = grid self.lwin = grid.GetGridColLabelWindow() self.lwin.PushEventHandler(self) self.colWin = None self.ux = self.grid.GetScrollPixelsPerUnit()[0] self.startX = -10 self.cellX = 0 self.didMove = False self.isDragging = False self.Bind(wx.EVT_MOTION, self.OnMouseMove) self.Bind(wx.EVT_LEFT_DOWN, self.OnPress) self.Bind(wx.EVT_LEFT_UP, self.OnRelease)
def __init__(self, grid): wx.EvtHandler.__init__(self) self.grid = grid self.lwin = grid.GetGridColLabelWindow() self.lwin.PushEventHandler(self) self.colWin = None self.startX = -10 self.cellX = 0 self.didMove = False self.isDragging = False self.captured = False self.Bind(wx.EVT_MOTION, self.OnMouseMove) self.Bind(wx.EVT_LEFT_DOWN, self.OnPress) self.Bind(wx.EVT_LEFT_UP, self.OnRelease) self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)