示例#1
0
    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)
示例#2
0
    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)