Commit 9ae3f33d authored by Gary Hodgson's avatar Gary Hodgson Committed by Guillaume Seguin

added abort button

parent a84770ea
...@@ -204,6 +204,9 @@ class setframe(wx.Frame): ...@@ -204,6 +204,9 @@ class setframe(wx.Frame):
self.projectedXmm = floatspin.FloatSpin(self.panel, -1, pos=(rightValueXPos+40, 210), value=150.0, increment=1, digits=1 ) self.projectedXmm = floatspin.FloatSpin(self.panel, -1, pos=(rightValueXPos+40, 210), value=150.0, increment=1, digits=1 )
self.projectedXmm.Bind(floatspin.EVT_FLOATSPIN, self.updateprojectedXmm) self.projectedXmm.Bind(floatspin.EVT_FLOATSPIN, self.updateprojectedXmm)
self.abort = wx.Button(self.panel, -1, "Abort!", pos=(leftlabelXPos, 180))
self.abort.Bind(wx.EVT_BUTTON, self.abortPresent)
self.Show() self.Show()
def __del__(self): def __del__(self):
...@@ -356,6 +359,10 @@ class setframe(wx.Frame): ...@@ -356,6 +359,10 @@ class setframe(wx.Frame):
size=(float(self.X.GetValue()), float(self.Y.GetValue())), size=(float(self.X.GetValue()), float(self.Y.GetValue())),
offset=(float(self.offsetX.GetValue()), float(self.offsetY.GetValue()))) offset=(float(self.offsetX.GetValue()), float(self.offsetY.GetValue())))
def abortPresent(self, event):
print "Abort"
self.f.timer.Stop()
if __name__ == "__main__": if __name__ == "__main__":
#a = wx.App(redirect=True,filename="mylogfile.txt") #a = wx.App(redirect=True,filename="mylogfile.txt")
a = wx.App() a = wx.App()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment