当前位置: 首页>>代码示例>>Python>>正文


Python BaseCompanions.ContainerDTC类代码示例

本文整理汇总了Python中BaseCompanions.ContainerDTC的典型用法代码示例。如果您正苦于以下问题:Python ContainerDTC类的具体用法?Python ContainerDTC怎么用?Python ContainerDTC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ContainerDTC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: notification

    def notification(self, compn, action):
        ContainerDTC.notification(self, compn, action)
        if action == 'delete':
            # If the splitter itself is deleted it should unsplit so that
            # deletion notifications from it's children won't cause
            # access to deleted controls
            if compn.control == self.control:
                self.win1 = self.win2 = None
                self.splitWindow(None, None)
                return
            # Win 1
            # If Window1 is None, splitter can only be unsplit
            if compn.control == self.win1:#self.GetWindow1(None):
                self.control.Unsplit(self.win1)
                if self.win2: self.win2.Show(True)
                self.win1 = self.win2 = None

                setterName = self.modeMethMap[self.control.GetSplitMode()]
                self.propRevertToDefault('Window1', setterName)
                self.designer.inspector.propertyUpdate('Window1')
                self.designer.inspector.propertyUpdate('Window2')
                return
            if compn.control == self.win2:#self.GetWindow2(None):
                self.SetWindow2(None)
                setterName = self.modeMethMap[self.control.GetSplitMode()]
                self.persistProp('Window2', setterName, None)
                self.designer.inspector.propertyUpdate('Window2')
                return
开发者ID:cwt,项目名称:boa-constructor,代码行数:28,代码来源:ContainerCompanions.py

示例2: writeConstructor

 def writeConstructor(self, output, collectionMethod, stripFrmId=""):
     ContainerDTC.writeConstructor(self, output, collectionMethod, stripFrmId="")
     if self.textConstr:
         # Add call to init utils after frame constructor
         if self.textConstr.comp_name == "" and collectionMethod == sourceconst.init_ctrls:
             if self.designer.dataView.objects:
                 output.append("%sself.%s()" % (sourceconst.bodyIndent, sourceconst.init_utils))
开发者ID:nyimbi,项目名称:boa-constructor,代码行数:7,代码来源:FrameCompanions.py

示例3: updatePosAndSize

 def updatePosAndSize(self):
     ContainerDTC.updatePosAndSize(self)
     # Argh, this is needed so that ClientSize is up to date
     if self.textPropList:
         for prop in self.textPropList:
             if prop.prop_name == 'ClientSize':
                 size = self.control.GetClientSize()
                 prop.params = ['wx.Size(%d, %d)' % (size.x, size.y)]
开发者ID:jpelton107,项目名称:python,代码行数:8,代码来源:FrameCompanions.py

示例4: __init__

 def __init__(self, name, designer, parent, ctrlClass):
     ContainerDTC.__init__(self, name, designer, parent, ctrlClass)
     self.editors.update({'Tools': CollectionPropEdit})
     self.subCompanions['Tools'] = ToolBarToolsCDTC
     self.windowStyles = ['wx.TB_FLAT', 'wx.TB_DOCKABLE', 'wx.TB_HORIZONTAL',
                          'wx.TB_VERTICAL', 'wx.TB_3DBUTTONS', 'wx.TB_TEXT',
                          'wx.TB_NOICONS', 'wx.TB_NODIVIDER', 'wx.TB_NOALIGN',
                         ] + self.windowStyles
开发者ID:cwt,项目名称:boa-constructor,代码行数:8,代码来源:ContainerCompanions.py

示例5: __init__

 def __init__(self, name, designer, frameCtrl):
     ContainerDTC.__init__(self, name, designer, None, None)
     self.control = frameCtrl
     self.editors['Flags'] = FlagsConstrPropEdit
     # XXX should rather be enumerated
     self.windowStyles = ['wx.SIMPLE_BORDER', 'wx.DOUBLE_BORDER',
                          'wx.SUNKEN_BORDER', 'wx.RAISED_BORDER',
                          'wx.STATIC_BORDER', 'wx.NO_BORDER']
开发者ID:jpelton107,项目名称:python,代码行数:8,代码来源:FrameCompanions.py

示例6: renameCtrlRefs

 def renameCtrlRefs(self, oldName, newName):
     ContainerDTC.renameCtrlRefs(self, oldName, newName)
     # Check if subwindow references have changed
     # XXX should maybe be done with notification, action = 'rename'
     oldSrc = Utils.srcRefFromCtrlName(oldName)
     for prop in self.textPropList:
         if prop.prop_setter in ('SplitVertically', 'SplitHorizontally'):
             if oldSrc in prop.params:
                 prop.params[prop.params.index(oldSrc)] = \
                       Utils.srcRefFromCtrlName(newName)
开发者ID:cwt,项目名称:boa-constructor,代码行数:10,代码来源:ContainerCompanions.py

示例7: persistProp

 def persistProp(self, name, setterName, value):
     if setterName == 'SetSashVisible':
         edge, visbl = value.split(',')
         for prop in self.textPropList:
             if prop.prop_setter == setterName and prop.params[0] == edge:
                 prop.params = [edge.strip(), visbl.strip()]
                 return
         self.textPropList.append(methodparse.PropertyParse( None, self.name,
             setterName, [edge.strip(), visbl.strip()], 'SetSashVisible'))
     else:
         ContainerDTC.persistProp(self, name, setterName, value)
开发者ID:cwt,项目名称:boa-constructor,代码行数:11,代码来源:ContainerCompanions.py

示例8: persistedPropVal

 def persistedPropVal(self, name, setterName):
     # Unlike usual properties, SashPosition is persisted as a Split* method
     # Therefore it needs to check the Split* method for the source value
     if setterName == 'SetSashPosition':
         for prop in self.textPropList:
             if prop.prop_setter in ('SplitVertically', 'SplitHorizontally'):
                 return prop.params[2]
     return ContainerDTC.persistedPropVal(self, name, setterName)
开发者ID:cwt,项目名称:boa-constructor,代码行数:8,代码来源:ContainerCompanions.py

示例9: dontPersistProps

 def dontPersistProps(self):
     # Note this is a workaround for a problem on wxGTK where the size
     # passed to the frame constructor is actually means ClientSize on wxGTK.
     # By having this property always set, this overrides the frame size
     # and uses the same size on Win and Lin
     props = ContainerDTC.dontPersistProps(self)
     props.remove('ClientSize')
     return props
开发者ID:jpelton107,项目名称:python,代码行数:8,代码来源:FrameCompanions.py

示例10: hideDesignTime

 def hideDesignTime(self):
     return ContainerDTC.hideDesignTime(self) + [
         "ToolBar",
         "MenuBar",
         "StatusBar",
         "Icon",
         "Anchors",
         "Constraints",
         "Label",
     ]
开发者ID:nyimbi,项目名称:boa-constructor,代码行数:10,代码来源:FrameCompanions.py

示例11: hideDesignTime

 def hideDesignTime(self):
     return ContainerDTC.hideDesignTime(self) + ['SplitMode']
开发者ID:cwt,项目名称:boa-constructor,代码行数:2,代码来源:ContainerCompanions.py

示例12: properties

 def properties(self):
     props = ContainerDTC.properties(self)
     prop = ('NameRoute', self.GetSashVisible, self.SetSashVisible)
     for name in self.edgeNameMap.keys():
         props[name] = prop
     return props
开发者ID:cwt,项目名称:boa-constructor,代码行数:6,代码来源:ContainerCompanions.py

示例13: dontPersistProps

 def dontPersistProps(self):
     return ContainerDTC.dontPersistProps(self) + ['Selection']
开发者ID:cwt,项目名称:boa-constructor,代码行数:2,代码来源:ContainerCompanions.py

示例14: events

 def events(self):
     return ContainerDTC.events(self) + ['SashEvent']
开发者ID:cwt,项目名称:boa-constructor,代码行数:2,代码来源:ContainerCompanions.py

示例15: designTimeControl

 def designTimeControl(self, position, size, args = None):
     ctrl = ContainerDTC.designTimeControl(self, position, size, args)
     ctrl.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged, id=ctrl.GetId())
     return ctrl
开发者ID:cwt,项目名称:boa-constructor,代码行数:4,代码来源:ContainerCompanions.py


注:本文中的BaseCompanions.ContainerDTC类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。