dabo Commit
Revision 4103
Date: 2008-05-29 06:13:57 -0700 (Thu, 29 May 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4103
Changed:
U trunk/dabo/ui/uiwx/dFormMixin.py
Log:
Added two convenience methods to the form: pushStatusText() and
popStatusText(). They are handy for when you want to temporarily display a
message and then restore things the way they were.
Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py 2008-05-27 23:10:05 UTC (rev 4102)
+++ trunk/dabo/ui/uiwx/dFormMixin.py 2008-05-29 13:13:57 UTC (rev 4103)
@@ -100,6 +100,7 @@
self.useOldDebugDialog = False
self.restoredSP = False
self._holdStatusText = ""
+ self._statusStack = []
if app is not None:
app.uiForms.add(self)
@@ -568,6 +569,22 @@
% self.getAbsoluteName(), 0)
+ def pushStatusText(self, txt):
+ """Stores the current text of the StatusBar on a LIFO stack for
later retrieval."""
+ self._statusStack.append(self.StatusText)
+ self.StatusText = txt
+
+
+ def popStatusText(self):
+ """Restores the StatusText to the last value pushed on the
stack. If there
+ are no values in the stack, nothing is changed.
+ """
+ txt = self._statusStack.pop()
+ if txt:
+ self.StatusText = txt
+
+
+ ################################
# property get/set/del functions follow:
def _getActiveControl(self):
# Can't use FindFocus: it returns whatever control has the
keyboard focus,
_______________________________________________
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]