dabo Commit
Revision 4410
Date: 2008-08-13 15:19:12 -0700 (Wed, 13 Aug 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4410
Changed:
U branches/Nate/dabo/ui/uiwx/dPageFrame.py
Log:
Added TabStyle and TabSideIncline properties to dAdvancedPageFrame.
Diff:
Modified: branches/Nate/dabo/ui/uiwx/dPageFrame.py
===================================================================
--- branches/Nate/dabo/ui/uiwx/dPageFrame.py 2008-08-13 21:39:03 UTC (rev
4409)
+++ branches/Nate/dabo/ui/uiwx/dPageFrame.py 2008-08-13 22:19:12 UTC (rev
4410)
@@ -60,6 +60,8 @@
self._showMenuOnSingleTab = True
self._showNavButtons = True
self._showPageCloseButtons = False
+ self._tabSideIncline = 0
+ self._tabStyle = "Default"
dPageFrameMixin.__init__(self, preClass, parent, properties,
attProperties, *args, **kwargs)
@@ -87,7 +89,11 @@
def _beforePageClose(self, page):
return self.beforePageClose(page)
+ def insertPage(self, *args, **kwargs):
+ super(dAdvancedPageFrame, self).insertPage(*args, **kwargs)
+ self.SetAllPagesShapeAngle(self._tabSideIncline)
#incline isn't autoset on new page add so set it
+
def beforePageClose(self, page):
"""Return False from this method to prevent the page from
closing."""
pass
@@ -180,6 +186,44 @@
else:
raise ValueError, (_("The only possible values are
'Top' and 'Bottom'"))
+
+ def _getTabSideIncline(self):
+ return self._tabSideIncline
+
+ def _setTabSideIncline(self, val):
+ val = int(val)
+ if val<0 or val>15:
+ raise ValueError, (_("Value must be 0 through 15"))
+
+ self._tabSideIncline = val
+ self.SetAllPagesShapeAngle(val)
+
+
+ def _getTabStyle(self):
+ return self._tabStyle
+
+ def _setTabStyle(self, val):
+ self._delWindowStyleFlag(fnb.FNB_VC8)
+ self._delWindowStyleFlag(fnb.FNB_VC71)
+ self._delWindowStyleFlag(fnb.FNB_FANCY_TABS)
+ self._delWindowStyleFlag(fnb.FNB_FF2)
+
+ if val == "Default":
+ pass
+ elif val == "VC8":
+ self._addWindowStyleFlag(fnb.FNB_VC8)
+ elif val == "VC71":
+ self._addWindowStyleFlag(fnb.FNB_VC71)
+ elif val == "Fancy":
+ self._addWindowStyleFlag(fnb.FNB_FANCY_TABS)
+ elif val == "Firefox":
+ self._addWindowStyleFlag(fnb.FNB_FF2)
+ else:
+ ValueError, (_("The only possible values are 'Default'
and 'VC8', 'VC71', 'Fancy', or 'Firefox'"))
+
+ self._tabStyle = val
+
+
#Property definitions
ShowDropdownTabList = property(_getShowDropdownTabList,
_setShowDropdownTabList, None,
_("""Specifies whether the dropdown tab list button is
visible in the menu (bool) (Default=False)
@@ -202,6 +246,20 @@
_("""Specifies where the page tabs are located.
(string)
Top (default)
Bottom""") )
+
+ TabSideIncline = property(_getTabSideIncline, _setTabSideIncline, None,
+ _("""Specifies the incline of the sides of the tab in
degrees (int) (Default=0)
+ Acceptable values are 0 - 15.
+ Note this property will have no effect when
TabStyle is something other than Default.
+ """))
+
+ TabStyle = property(_getTabStyle, _setTabStyle, None,
+ _("""Specifies the style of the display tabs. (string)
+ "Default" (default)
+ "VC8"
+ "VC71"
+ "Fancy"
+ "Firefox\""""))
class dPageList(dPageFrameMixin, wx.Listbook):
@@ -382,6 +440,12 @@
self.Width = 400
self.Height = 175
self.TabPosition = random.choice(("Top", "Bottom"))
+ self.ShowDropdownTabList = random.choice(("True", "False"))
+ self.ShowMenuClose = random.choice(("True", "False"))
+ self.ShowPageCloseButtons = random.choice(("True", "False"))
+ self.ShowMenuOnSingleTab = random.choice(("True", "False"))
+ self.TabStyle = random.choice(("Default", "VC8", "VC71",
"Fancy", "Firefox"))
+
class _dPageFrame_test(TestMixin, dPageFrame): pass
class _dPageList_test(TestMixin, dPageList): pass
class _dPageSelect_test(TestMixin, dPageSelect): pass
_______________________________________________
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]