Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
 def notification(self, compn, action):
     ContainerDTC.notification(self, compn, action)
     if action == 'delete':
         if self.control.GetImageList() == compn.control:
             self.propRevertToDefault('ImageList', 'SetImageList')
             self.control.SetImageList(None)
Esempio n. 4
0
 def notification(self, compn, action):
     ContainerDTC.notification(self, compn, action)
     if action == 'delete':
         if self.control.GetTargetWindow() == compn.control:
             self.propRevertToDefault('TargetWindow', 'SetTargetWindow')
             self.control.SetTargetWindow(self.control)
Esempio n. 5
0
 def notification(self, compn, action):
     ContainerDTC.notification(self, compn, action)
     if action == 'delete':
         if self.control.GetImageList() == compn.control:
             self.propRevertToDefault('ImageList', 'SetImageList')
             self.control.SetImageList(None)
Esempio n. 6
0
 def notification(self, compn, action):
     ContainerDTC.notification(self, compn, action)
     if action == 'delete':
         if self.control.GetTargetWindow() == compn.control:
             self.propRevertToDefault('TargetWindow', 'SetTargetWindow')
             self.control.SetTargetWindow(self.control)