X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33785d9f22d92717aedef5249210e03b69bdff5c..609b563c8b9ade4fcde9160f11c7deaf16a9f7b6:/wxPython/wx/lib/gridmovers.py diff --git a/wxPython/wx/lib/gridmovers.py b/wxPython/wx/lib/gridmovers.py index bb931d1e46..1bd462ceaf 100644 --- a/wxPython/wx/lib/gridmovers.py +++ b/wxPython/wx/lib/gridmovers.py @@ -159,12 +159,12 @@ class ColDragWindow(wx.Window): def OnPaint(self,evt): dc = wx.PaintDC(self) w,h = self.GetSize() - dc.DrawBitmap(self.image, (0,0)) + dc.DrawBitmap(self.image, 0,0) dc.SetPen(wx.Pen(wx.BLACK,1,wx.SOLID)) dc.SetBrush(wx.TRANSPARENT_BRUSH) - dc.DrawRectangle((0,0), (w,h)) + dc.DrawRectangle(0,0, w,h) iPos = self.GetInsertionPos() - dc.DrawLine((iPos,h - 10), (iPos,h)) + dc.DrawLine(iPos,h - 10, iPos,h) @@ -222,12 +222,12 @@ class RowDragWindow(wx.Window): def OnPaint(self,evt): dc = wx.PaintDC(self) w,h = self.GetSize() - dc.DrawBitmap(self.image, (0,0)) + dc.DrawBitmap(self.image, 0,0) dc.SetPen(wx.Pen(wx.BLACK,1,wx.SOLID)) dc.SetBrush(wx.TRANSPARENT_BRUSH) - dc.DrawRectangle((0,0), (w,h)) + dc.DrawRectangle(0,0, w,h) iPos = self.GetInsertionPos() - dc.DrawLine((w - 10,iPos), (w,iPos)) + dc.DrawLine(w - 10,iPos, w,iPos) #---------------------------------------------------------------------------- @@ -314,6 +314,7 @@ class GridColMover(wx.EvtHandler): self.colWin = ColDragWindow(self.grid,colImg,col) self.colWin.Show(False) self.lwin.CaptureMouse() + evt.Skip() def OnRelease(self,evt): if self.isDragging: @@ -346,7 +347,7 @@ class GridColMover(wx.EvtHandler): memdc = wx.MemoryDC() memdc.SelectObject(bmp) dc = wx.WindowDC(self.lwin) - memdc.Blit((0,0), rect.GetSize(), dc, rect.GetPosition()) + memdc.Blit(0,0, rect.width, rect.height, dc, rect.x, rect.y) memdc.SelectObject(wx.NullBitmap) return bmp @@ -437,6 +438,7 @@ class GridRowMover(wx.EvtHandler): self.rowWin = RowDragWindow(self.grid,rowImg,row) self.rowWin.Show(False) self.lwin.CaptureMouse() + evt.Skip() def OnRelease(self,evt): if self.isDragging: @@ -469,7 +471,7 @@ class GridRowMover(wx.EvtHandler): memdc = wx.MemoryDC() memdc.SelectObject(bmp) dc = wx.WindowDC(self.lwin) - memdc.Blit((0,0), rect.GetSize(), dc, rect.GetPosition()) + memdc.Blit(0,0, rect.width, rect.height, dc, rect.x, rect.y) memdc.SelectObject(wx.NullBitmap) return bmp