dabo Commit
Revision 1532
Date: 2005-11-09 15:43:30 -0800 (Wed, 09 Nov 2005)
Author: ed
Changed:
U trunk/dabo/ui/dialogs/WizardPage.py
Log:
Added 'Wizard' property, which can be used by the page to refer to its
containing Wizard. Yes, it's the same as referring to self.Form, but seems more
intuitive when writing wizard code.
Diff:
Modified: trunk/dabo/ui/dialogs/WizardPage.py
===================================================================
--- trunk/dabo/ui/dialogs/WizardPage.py 2005-11-09 22:09:50 UTC (rev 1531)
+++ trunk/dabo/ui/dialogs/WizardPage.py 2005-11-09 23:43:30 UTC (rev 1532)
@@ -14,6 +14,7 @@
super(WizardPage, self).__init__(parent=parent,
properties=properties, *args, **kwargs)
+ self._wizard = None
self._nextPage = self._prevPage = None
self._title = None
self._titleFontFace = self.FontFace
@@ -21,7 +22,7 @@
self.setup()
self.layout()
-
+
def setup(self):
self.makeSizer()
if self.Title is None:
@@ -102,22 +103,27 @@
# Property definitions.
def _getTitle(self):
return self._titleCaption
+
def _setTitle(self, val):
self._titleCaption = val
if self._title:
self._title.Caption = val
self.layout()
+
def _getTitleFace(self):
return self._titleFontFace
+
def _setTitleFace(self, val):
self._titleFontFace = val
if self._title:
self._title.FontFace = val
self.layout()
+
def _getTitleSize(self):
return self._titleFontSize
+
def _setTitleSize(self, val):
self._titleFontSize = val
if self._title:
@@ -125,6 +131,17 @@
self.layout()
+ def _getWizard(self):
+ ret = self._wizard
+ if ret is None:
+ ret = self.Form
+ return ret
+
+ def _setWizard(self, val):
+ self._wizard = val
+
+
+
Title = property(_getTitle, _setTitle, None,
_("Displays a title at the top of the page. (string)")
)
@@ -134,3 +151,5 @@
TitleSize = property(_getTitleSize, _setTitleSize, None,
_("Size in points for the Title (default=18). (int)") )
+ Wizard = property(_getWizard, _setWizard, None,
+ _("Reference to the wizard form this page is in
(Wizard object)"))
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev