dabo Commit
Revision 4881
Date: 2008-12-19 16:05:26 -0800 (Fri, 19 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/dabo/changeset/4881
Changed:
U trunk/dabo/lib/datanav/Form.py
Log:
Needed to bind the escape key for the edit form to close on escape. Also needed
to set focus to the first control.
Diff:
Modified: trunk/dabo/lib/datanav/Form.py
===================================================================
--- trunk/dabo/lib/datanav/Form.py 2008-12-19 18:11:02 UTC (rev 4880)
+++ trunk/dabo/lib/datanav/Form.py 2008-12-20 00:05:26 UTC (rev 4881)
@@ -44,12 +44,15 @@
dabo.ui.callAfter(self.hide)
# Pressing Esc hides the form
self.bindKey("esc", _onHide)
-
+
# Create the various elements:
self.setupPageFrame()
- if self.Modal and self.FormType == "Edit":
- self.setupSaveCancelButtons()
+ if self.FormType == "Edit":
+ self.pageFrame.Pages[0].setFocus()
+ if self.Modal:
+ self.setupSaveCancelButtons()
+ self.bindKey("esc", self.onCancel)
if not self.Testing and not self.Modal:
self.setupToolBar()
_______________________________________________
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]