dabo Commit
Revision 4228
Date: 2008-07-04 09:59:30 -0700 (Fri, 04 Jul 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4228
Changed:
U trunk/dabo/ui/uiwx/dDialog.py
Log:
Added the Borderless property. When True, the dialog will have no title bar or
border.
Diff:
Modified: trunk/dabo/ui/uiwx/dDialog.py
===================================================================
--- trunk/dabo/ui/uiwx/dDialog.py 2008-07-04 15:35:01 UTC (rev 4227)
+++ trunk/dabo/ui/uiwx/dDialog.py 2008-07-04 16:59:30 UTC (rev 4228)
@@ -23,8 +23,12 @@
self._modal = True
self._centered = True
self._fit = True
+ self._borderless = self._extractKey((properties, kwargs),
"Borderless", False)
- defaultStyle = wx.DEFAULT_DIALOG_STYLE
+ if self._borderless:
+ defaultStyle = wx.STAY_ON_TOP
+ else:
+ defaultStyle = wx.DEFAULT_DIALOG_STYLE
try:
kwargs["style"] = kwargs["style"] | defaultStyle
except KeyError:
@@ -131,6 +135,16 @@
self._fit = val
+ def _getBorderless(self):
+ return self._borderless
+
+ def _setBorderless(self, val):
+ if self._constructed():
+ raise ValueError, _("Cannot set the Borderless property
once the dialog is created.")
+ else:
+ self._properties["Borderless"] = val
+
+
def _getCaption(self):
return self.GetTitle()
@@ -162,16 +176,20 @@
AutoSize = property(_getAutoSize, _setAutoSize, None,
- "When True, the dialog resizes to fit the added
controls. (bool)")
+ _("When True, the dialog resizes to fit the added
controls. (bool)"))
+ Borderless = property(_getBorderless, _setBorderless, None,
+ _("""Must be passed at construction time. When set to
True, the dialog displays
+ without a title bar or borders (bool)"""))
+
Caption = property(_getCaption, _setCaption, None,
- "The text that appears in the dialog's title bar
(str)" )
+ _("The text that appears in the dialog's title bar
(str)") )
Centered = property(_getCentered, _setCentered, None,
- "Determines if the dialog is displayed centered on the
screen. (bool)")
+ _("Determines if the dialog is displayed centered on
the screen. (bool)"))
Modal = property(_getModal, _setModal, None,
- "Determines if the dialog is shown modal (default) or
modeless. (bool)")
+ _("Determines if the dialog is shown modal (default) or
modeless. (bool)"))
DynamicAutoSize = makeDynamicProperty(AutoSize)
_______________________________________________
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]