Ok, This is what I tried but for some reason now as soon as I click the button my whole app freezes.
def OnMoveLeftDown(self, event):
if event.LeftDown():
winPosition = self.GetPosition()
mousePosition = wxGetMousePosition()
offsetx = mousePosition[0] - winPosition[0]
offsety = mousePosition[1] - winPosition[1]
self.CaptureMouse()
elif event.Dragging():
mousePosition = wxGetMousePosition()
winPosition[0] = mousePosition[0] - offsetx
winPosition[1] = mousePosition[1] - offsetx
self.Move(winPosition)
elif event.LeftUp():
self.ReleaseMouse()
Tyler Foster
ยทยทยท
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
Tyler foster wrote:
Ok, This is what I tried but for some reason now as soon as I click the button my whole app freezes.
def OnMoveLeftDown(self, event):
if event.LeftDown():
winPosition = self.GetPosition() mousePosition = wxGetMousePosition()
offsetx = mousePosition[0] - winPosition[0]
offsety = mousePosition[1] - winPosition[1]
self.CaptureMouse()
elif event.Dragging():
mousePosition = wxGetMousePosition()
winPosition[0] = mousePosition[0] - offsetx
winPosition[1] = mousePosition[1] - offsetx
self.Move(winPosition)
elif event.LeftUp():
self.ReleaseMouse()
IMHO you need self.offsetx instead of offsetx
Niki Spahiev