dabo Commit
Revision 6096
Date: 2010-10-08 11:31:31 -0700 (Fri, 08 Oct 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6096
Changed:
U trunk/dabo/ui/uiwx/dReportProgress.py
Log:
I wanted to be able to call self.ProgressControl.cancel() in my report dialog's
beforeClose() handler.
Diff:
Modified: trunk/dabo/ui/uiwx/dReportProgress.py
===================================================================
--- trunk/dabo/ui/uiwx/dReportProgress.py 2010-10-08 17:51:01 UTC (rev
6095)
+++ trunk/dabo/ui/uiwx/dReportProgress.py 2010-10-08 18:31:31 UTC (rev
6096)
@@ -22,6 +22,7 @@
ms.append(butCancel, alignment="right")
self.Visible = False
+
def show(self):
self.oldCancel = self.Form.FindWindowById(wx.ID_CANCEL)
if self.oldCancel:
@@ -34,6 +35,7 @@
self.setFocus() ## Ensures a pressed 'esc' will register on
our cancel button
self.Visible = True
+
def hide(self):
self.Visible = False
self.oldFocus.setFocus() ## Let 'esc' register on the form
instead of our cancel button
@@ -44,15 +46,21 @@
self.oldCancel.Enabled = True
self.oldCancel.CancelButton = True
+
def updateProgress(self, val, range_):
self.gauge.Range = range_
self.gauge.Value = val
self.gauge.refresh()
+
def onCancel(self, evt):
evt.stop() ## keep dialogs from automatically being closed.
if not self.Visible:
return
+ self.cancel()
+
+
+ def cancel(self):
self.ProcessObject.cancel()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]