For some reason as soon as I get to " print 'captured' " the software stops responding. I can't figure it out If anyone could help I would really appreciate it.
if event.LeftDown():
print 'capturing'
self.CaptureMouse()
print 'captured'
elif event.Dragging():
print 'dragging'
self.winPosition = self.GetPosition()
self.mousePosition = wxGetMousePosition()
self.offsetx = self.mousePosition[0] - self.winPosition[0]
self.offsety = self.mousePosition[1] - self.winPosition[1]
print 'offset set'
self.mousePosition = wxGetMousePosition()
self.winPosition[0] = self.mousePosition[0] - self.offsetx
self.winPosition[1] = self.mousePosition[1] - self.offsety
print 'moving'
self.Move(winPosition)
print 'moved'elif event.LeftUp():
print 'releasing'
self.ReleaseMouse()
print 'released'Tyler Foster
elif event.Dragging():
print 'dragging'
self.winPosition = self.GetPosition()
self.mousePosition = wxGetMousePosition()
self.winPosition[0] = self.mousePosition[0]
self.winPosition[1] = self.mousePosition[1]
print 'moving'
self.Move(winPosition)
print 'moved'
Niki Spahiev
_______________________________________________
wxpython-users mailing list
wxpytho...@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
> For some reason as soon as I get to " print 'captured' " the
> software stops responding. I can't figure it out If anyone
> could help I would really appreciate it.
Does it print "captured" or not? Please make a small (but complete) sample
that shows this problem.
--
Robin Dunn
Software Craftsman
ro...@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
def OnMoveLeftDown(self, event):
if event.LeftDown():
print 'capturing'
self.CaptureMouse()
print 'captured' <--It prints this then crashes
elif event.Dragging():
print 'dragging'
self.winPosition = self.GetPosition()
self.mousePosition = wxGetMousePosition()
self.offsetx = self.mousePosition[0] - self.winPosition[0]
self.offsety = self.mousePosition[1] - self.winPosition[1]
print 'offset set'
self.mousePosition = wxGetMousePosition()
self.winPosition[0] = self.mousePosition[0] - self.offsety
self.winPosition[1] = self.mousePosition[1] - self.offsetx
print 'moving'
self.Move(self.winPosition)
print 'moved'
elif event.LeftUp():
print 'releasing'
self.ReleaseMouse()
print 'released'
what I mean by "Crashes" Is completly freezes some times if I take the focus off the of the App and then focus back on it it unfreezes as long as I dont click on the button again.
Tyler
----- Original Message -----From: Dale Strickland-ClarkSent: Tuesday, January 15, 2002 3:10 PMSubject: RE: [wxPython] CaptureMouse ProblemAre you running this under PythonWin, by any chance?
If you are, try just running it from a command prompt.
Dale Strickland-Clark
Riverhall Systems Ltd. Custom database and Web applications.
Offices: London & Wokingham
-----Original Message-----
From: Tyler foster [mailto:xmon...@msn.com]
Sent: Tue, 2002 January 15 21:40
To: wxpytho...@lists.wxwindows.org
Subject: Re: [wxPython] CaptureMouse Problem
def OnMoveLeftDown(self, event):
<--It prints this then crashes
elif event.Dragging():