dabo Commit
Revision 4070
Date: 2008-05-05 13:09:18 -0700 (Mon, 05 May 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4070

Changed:
U   trunk/dabo/ui/uiwx/dShell.py
U   trunk/dabo/ui/uiwx/dSplitForm.py
U   trunk/dabo/ui/uiwx/dSplitter.py

Log:
Added optional 'createSizers' parameter to dSplitter. Like 'createPanes', it 
instructs the class to add sizers to the default panes. Of course, 
'createPanes' must also be true, or this will have no effect.

Modified dSplitForm to default to creating panes with sizers.

Updated dShell to use the recently-added Splitter property. 


Diff:
Modified: trunk/dabo/ui/uiwx/dShell.py
===================================================================
--- trunk/dabo/ui/uiwx/dShell.py        2008-05-05 20:05:11 UTC (rev 4069)
+++ trunk/dabo/ui/uiwx/dShell.py        2008-05-05 20:09:18 UTC (rev 4070)
@@ -169,7 +169,7 @@
                self._oldRawInput = __builtin__.raw_input
                self.bindEvent(dabo.dEvents.Destroy, self._onDestroy)
 
-               splt = self.splitter
+               splt = self.Splitter
                splt.MinimumPanelSize = 80
                splt.unbindEvent()
                self.Orientation = "H"

Modified: trunk/dabo/ui/uiwx/dSplitForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dSplitForm.py    2008-05-05 20:05:11 UTC (rev 4069)
+++ trunk/dabo/ui/uiwx/dSplitForm.py    2008-05-05 20:09:18 UTC (rev 4070)
@@ -74,7 +74,8 @@
 
        def _getSplitter(self):
                if self._splitter is None:
-                       win = self._splitter = dSplitter(self, 
createPanes=True, RegID="MainSplitter")
+                       win = self._splitter = dSplitter(self, 
createPanes=True, createSizers=True,
+                                       RegID="MainSplitter")
                        def addToSizer(frm, itm):
                                if not frm.Sizer:
                                        dabo.ui.callAfter(addToSizer, frm, itm)

Modified: trunk/dabo/ui/uiwx/dSplitter.py
===================================================================
--- trunk/dabo/ui/uiwx/dSplitter.py     2008-05-05 20:05:11 UTC (rev 4069)
+++ trunk/dabo/ui/uiwx/dSplitter.py     2008-05-05 20:09:18 UTC (rev 4070)
@@ -114,6 +114,11 @@
                        self._createPanes = (self._createPanes == "True")
                else:
                        self._createPanes = self._extractKey((kwargs, 
properties), "createPanes", False)
+               self._createSizers = self._extractKey(attProperties, 
"createSizers", None)
+               if self._createSizers is not None:
+                       self._createSizers = (self._createSizers == "True")
+               else:
+                       self._createSizers = self._extractKey((kwargs, 
properties), "createSizers", False)
                self._splitOnInit = self._extractKey(attProperties, 
"splitOnInit", None)
                if self._splitOnInit is not None:
                        self._splitOnInit = (self._splitOnInit == "True")
@@ -182,8 +187,12 @@
                        p2 = (pane == 2)
                if p1 and (force or self.Panel1 is None):
                        self.Panel1 = spCls(self)
+                       if self._createSizers:
+                               self.Panel1.Sizer = dabo.ui.dSizer()
                if p2 and (force or self.Panel2 is None):
                        self.Panel2 = spCls(self)
+                       if self._createSizers:
+                               self.Panel2.Sizer = dabo.ui.dSizer()
        
        
        def initialize(self, pnl):




_______________________________________________
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