dabo Commit
Revision 4408
Date: 2008-08-13 14:38:20 -0700 (Wed, 13 Aug 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4408
Changed:
U branches/Nate/dabo/ui/uiwx/dPageFrame.py
Log:
Added properties to show close buttons on the menu and on the page tabs
themselves.
Diff:
Modified: branches/Nate/dabo/ui/uiwx/dPageFrame.py
===================================================================
--- branches/Nate/dabo/ui/uiwx/dPageFrame.py 2008-08-13 21:25:01 UTC (rev
4407)
+++ branches/Nate/dabo/ui/uiwx/dPageFrame.py 2008-08-13 21:38:20 UTC (rev
4408)
@@ -56,8 +56,10 @@
preClass = fnb.FlatNotebook
self._showDropdownTabList = False
+ self._showMenuCloseButton = True
self._showMenuOnSingleTab = True
self._showNavButtons = True
+ self._showPageCloseButtons = False
dPageFrameMixin.__init__(self, preClass, parent, properties,
attProperties, *args, **kwargs)
@@ -111,6 +113,18 @@
self._showDropdownTabList = val
+ def _getShowMenuCloseButton(self):
+ return self._showMenuCloseButton
+
+ def _setShowMenuCloseButton(self, val):
+ val = bool(val)
+ if val:
+ self._delWindowStyleFlag(fnb.FNB_NO_X_BUTTON)
+ else:
+ self._addWindowStyleFlag(fnb.FNB_NO_X_BUTTON)
+ self._showMenuCloseButton = val
+
+
def _getShowMenuOnSingleTab(self):
return self._showMenuOnSingleTab
@@ -137,6 +151,18 @@
self._showNavButtons = val
+ def _getShowPageCloseButtons(self):
+ return self._showPageCloseButtons
+
+ def _setShowPageCloseButtons(self, val):
+ val = bool(val)
+ if val:
+ self._addWindowStyleFlag(fnb.FNB_X_ON_TAB)
+ else:
+ self._delWindowStyleFlag(fnb.FNB_X_ON_TAB)
+ self._showPageCloseButtons = val
+
+
def _getTabPosition(self):
if self._hasWindowStyleFlag(self._tabposBottom):
return "Bottom"
@@ -159,9 +185,15 @@
_("""Specifies whether the dropdown tab list button is
visible in the menu (bool) (Default=False)
Setting this property to True will set ShowNavButtons
to False"""))
+ ShowMenuCloseButton = property(_getShowMenuCloseButton,
_setShowMenuCloseButton, None,
+ _("Specifies whether the close button is visible in the
menu (bool) (Default=False)"))
+
ShowMenuOnSingleTab = property(_getShowMenuOnSingleTab,
_setShowMenuOnSingleTab, None,
_("Specifies whether the tab thumbs and nav buttons are
shown when there is a single tab. (bool) (Default=True)"))
+ ShowPageCloseButtons = property(_getShowPageCloseButtons,
_setShowPageCloseButtons, None,
+ _("Specifies whether the close button is visible on the
page tab (bool) (Default=False)"))
+
ShowNavButtons = property(_getShowNavButtons, _setShowNavButtons, None,
_("""Specifies whether the left and right nav buttons
are visible in the menu (bool) (Default=True)
Setting this property to True will set
ShowDropdownTabList to False"""))
_______________________________________________
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]