dabo Commit
Revision 6094
Date: 2010-10-08 10:50:09 -0700 (Fri, 08 Oct 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6094
Changed:
U trunk/dabo/ui/uiwx/dReportProgress.py
Log:
By shifting focus to the progress control while it is visible, the
cancel button will be clicked when the user presses escape, even if
the outer form has a bindKey("esc") in effect.
Diff:
Modified: trunk/dabo/ui/uiwx/dReportProgress.py
===================================================================
--- trunk/dabo/ui/uiwx/dReportProgress.py 2010-10-08 04:12:59 UTC (rev
6093)
+++ trunk/dabo/ui/uiwx/dReportProgress.py 2010-10-08 17:50:09 UTC (rev
6094)
@@ -30,10 +30,13 @@
self.oldCancel.CancelButton = False
self.butCancelReportProgress.Enabled = True
self.butCancelReportProgress.CancelButton = True
+ self.oldFocus = self.Form.ActiveControl
+ 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
self.butCancelReportProgress.Enabled = False
self.butCancelReportProgress.CancelButton = False
if self.oldCancel:
_______________________________________________
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]