daboide Commit Revision 595 Date: 2006-06-30 14:27:44 -0700 (Fri, 30 Jun 2006) Author: ed
Changed: U trunk/ClassDesigner.py U trunk/ClassDesignerControlMixin.py
Log: Began work on getting dSplitter working in the Class Designer. It now instantiates without error, but you can't do much more at this point.
Diff: Modified: trunk/ClassDesigner.py =================================================================== --- trunk/ClassDesigner.py 2006-06-23 14:48:29 UTC (rev 594) +++ trunk/ClassDesigner.py 2006-06-30 21:27:44 UTC (rev 595) @@ -1844,7 +1844,7 @@ _("New Grid Control"), "3")) except: newCols = 3 - + # Need to notify the tree that an update to a node will be # happening. Get the affected node nd = self.Tree.getNodeFor(pnl) @@ -1870,6 +1870,15 @@ else: sz.insert(pos, obj) + if issubclass(cls, dui.dSplitter): + # Add the panels + pnlClass = self.getControlClass(obj.PanelClass) + obj.PanelClass = pnlClass + obj.createPanes() + if attProperties is not None: + if not attProperties.has_key("Split"): + obj.Split = True + if isPageControl: pg0panel = None for pg in obj.Pages[::-1]:
Modified: trunk/ClassDesignerControlMixin.py =================================================================== --- trunk/ClassDesignerControlMixin.py 2006-06-23 14:48:29 UTC (rev 594) +++ trunk/ClassDesignerControlMixin.py 2006-06-30 21:27:44 UTC (rev 595) @@ -117,12 +117,15 @@ def onMouseLeftUp(self, evt): - self.Form.processLeftUp(self, evt.shiftDown) - evt.stop() + if isinstance(self, (dabo.ui.dSplitter, )): + pass + else: + self.Form.processLeftUp(self, evt.shiftDown) + evt.stop() def onMouseLeftDown(self, evt): - if isinstance(self, dPageFrameMixin): + if isinstance(self, (dPageFrameMixin, dabo.ui.dSplitter)): pass else: evt.stop() @@ -410,6 +413,13 @@ "values" : ["Top", "Bottom", "Middle"]}} sliderProps = {"Max": {"type" : int, "readonly" : False}, "Min": {"type" : int, "readonly" : False}} + splitterProps = { "MinimumPanelSize": {"type" : int, "readonly" : False}, + "Orientation": {"type" : list, "readonly" : False, + "values" : ["Horizontal", "Vertical"]}, + "PanelClass" : {"type" : unicode, "readonly" : False}, + "SashPosition": {"type" : int, "readonly" : False}, + "ShowPanelSplitMenu" : {"type" : bool, "readonly" : False}, + "Split" : {"type" : bool, "readonly" : False}} gridSizerProps = {"Sizer_RowExpand" : {"type" : bool, "readonly" : False}, "Sizer_ColExpand" : {"type" : bool, "readonly" : False}, "Sizer_RowSpan" : {"type" : int, "readonly" : False}, @@ -530,7 +540,7 @@ ret.update(colorProps) ret.update(fontProps) elif isinstance(self, dabo.ui.dSplitter): - pass + ret.update(splitterProps) elif isinstance(self, dabo.ui.dStatusBar): ret.update(fontProps) elif isinstance(self, dabo.ui.dTextBox):
©2006 Ed Leafe |
|