dabo Commit
Revision 6475
Date: 2011-02-26 10:29:41 -0800 (Sat, 26 Feb 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6475

Changed:
U   trunk/dabo/ui/uiwx/dSlidePanelControl.py

Log:
Fix to allow some properties could be used as new object instance parameters.

Diff:
Modified: trunk/dabo/ui/uiwx/dSlidePanelControl.py
===================================================================
--- trunk/dabo/ui/uiwx/dSlidePanelControl.py    2011-02-25 11:54:24 UTC (rev 
6474)
+++ trunk/dabo/ui/uiwx/dSlidePanelControl.py    2011-02-26 18:29:41 UTC (rev 
6475)
@@ -194,16 +194,19 @@
 
 
        def _setBarStyle(self, val):
-               if val.lower().strip() not in self._barStylesLow:
-                       bs = ", ".join(self._barStyles)
-                       dabo.log.error(_("Unknown BarStyle passed: %(val)s. 
BarStyle must be one of: %(bs)s")
-                                       % locals())
+               if self._constructed():
+                       if val.lower().strip() not in self._barStylesLow:
+                               bs = ", ".join(self._barStyles)
+                               dabo.log.error(_("Unknown BarStyle passed: 
%(val)s. BarStyle must be one of: %(bs)s")
+                                               % locals())
+                       else:
+                               self._barStyle = val
+                               # Apply it
+                               style = self._captionBar.GetCaptionStyle()
+                               
style.SetCaptionStyle(self._barStyleConstants[val.lower().strip()])
+                               self._captionBar.SetCaptionStyle(style)
                else:
-                       self._barStyle = val
-                       # Apply it
-                       style = self._captionBar.GetCaptionStyle()
-                       
style.SetCaptionStyle(self._barStyleConstants[val.lower().strip()])
-                       self._captionBar.SetCaptionStyle(style)
+                       self._properties["BarStyle"] = val
 
 
        def _getBorder(self):
@@ -232,8 +235,11 @@
                return self._captionBar._caption
 
        def _setCaption(self, val):
-               self._captionBar._caption = val
-               self.refresh()
+               if self._constructed():
+                       self._captionBar._caption = val
+                       self.refresh()
+               else:
+                       self._properties["Caption"] = val
 
 
        def _getCaptionForeColor(self):



_______________________________________________
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]

Reply via email to