dabo Commit
Revision 4406
Date: 2008-08-13 14:24:53 -0700 (Wed, 13 Aug 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4406
Changed:
U branches/Nate/dabo/ui/uiwx/dPageFrame.py
Log:
Added properties for showing nav buttons and a dropdown tab list. Note that
they are mutually exclusive. You can show both at the same time, but the
dropdown tab list button covers up the right nav button. So, if you set one to
True the other property will be set to False.
Diff:
Modified: branches/Nate/dabo/ui/uiwx/dPageFrame.py
===================================================================
--- branches/Nate/dabo/ui/uiwx/dPageFrame.py 2008-08-13 21:03:25 UTC (rev
4405)
+++ branches/Nate/dabo/ui/uiwx/dPageFrame.py 2008-08-13 21:24:53 UTC (rev
4406)
@@ -55,7 +55,9 @@
self._baseClass = dAdvancedPageFrame
preClass = fnb.FlatNotebook
+ self._showDropdownTabList = False
self._showMenuOnSingleTab = True
+ self._showNavButtons = True
dPageFrameMixin.__init__(self, preClass, parent, properties,
attProperties, *args, **kwargs)
@@ -95,6 +97,20 @@
self.GetPage(self.GetSelection()).raiseEvent(dEvents.PageContextMenu)
#Property getters and setters
+ def _getShowDropdownTabList(self):
+ return self._showDropdownTabList
+
+ def _setShowDropdownTabList(self, val):
+ val = bool(val)
+ if val:
+ self._addWindowStyleFlag(fnb.FNB_DROPDOWN_TABS_LIST)
+ self._addWindowStyleFlag(fnb.FNB_NO_NAV_BUTTONS)
+ self._showNavButtons = False
+ else:
+ self._delWindowStyleFlag(fnb.FNB_DROPDOWN_TABS_LIST)
+ self._showDropdownTabList = val
+
+
def _getShowMenuOnSingleTab(self):
return self._showMenuOnSingleTab
@@ -107,6 +123,20 @@
self._showMenuOnSingleTab = val
+ def _getShowNavButtons(self):
+ return self._showNavButtons
+
+ def _setShowNavButtons(self, val):
+ val = bool(val)
+ if val:
+ self._delWindowStyleFlag(fnb.FNB_NO_NAV_BUTTONS)
+ self._delWindowStyleFlag(fnb.FNB_DROPDOWN_TABS_LIST)
+ self._showDropdownTabList = False
+ else:
+ self._addWindowStyleFlag(fnb.FNB_NO_NAV_BUTTONS)
+ self._showNavButtons = val
+
+
def _getTabPosition(self):
if self._hasWindowStyleFlag(self._tabposBottom):
return "Bottom"
@@ -125,9 +155,17 @@
raise ValueError, (_("The only possible values are
'Top' and 'Bottom'"))
#Property definitions
+ ShowDropdownTabList = property(_getShowDropdownTabList,
_setShowDropdownTabList, None,
+ _("""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"""))
+
ShowMenuOnSingleTab = property(_getShowMenuOnSingleTab,
_setShowMenuOnSingleTab, None,
_("Specifies whether the tab thumbs and nav buttons are
shown when there is a single tab. (bool) (Default=True)"))
+ 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"""))
+
TabPosition = property(_getTabPosition, _setTabPosition, None,
_("""Specifies where the page tabs are located.
(string)
Top (default)
_______________________________________________
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]