def __init__(self, name, parent, id, win_1, win_2, orientation, sizer, pos): ManagedBase.__init__(self, name, 'wxSplitterWindow', parent, id, sizer, pos) EditStylesMixin.__init__(self) # initialise instance properties self.no_custom_class = np.CheckBoxProperty(False, default_value=False) self.sash_pos = np.SpinPropertyD(0, default_value="") if hasattr(wx, "SpinCtrlDouble"): self.sash_gravity = np.SpinDoublePropertyD(0.5, (0.0, 1.0), default_value=0.0, immediate=True) else: self.sash_gravity = np.FloatPropertyD(0.5, (0.0, 1.0), default_value=0.0) self.min_pane_size = np.SpinProperty(20) # hidden properties: orientation string, window_1, window_2 self.orientation = np.Property(orientation) self.window_1 = ChildWidgetNameProperty("_window_1") self.window_2 = ChildWidgetNameProperty("_window_2") self.virtual_sizer = SplitterWindowSizer(self) labels = ("SLOT Left", "SLOT Right") if orientation == "wxSPLIT_VERTICAL" else ( "SLOT Top", "SLOT Bottom") self._window_1 = win_1 or SizerSlot( self, self.virtual_sizer, 1, label=labels[0]) self._window_2 = win_2 or SizerSlot( self, self.virtual_sizer, 2, label=labels[1])
def __init__(self, name, parent, index): ManagedBase.__init__(self, name, parent, index) EditStylesMixin.__init__(self) # initialise instance properties self.range = np.FloatRangePropertyA( "0.0, 100.0" ) self.value = np.SpinDoublePropertyA(0, val_range=(0.0,100.0), immediate=True, default_value="") self.increment = np.SpinDoublePropertyD(1.0, val_range=(0.0,100.0), immediate=True, default_value=1.0) self.digits = np.SpinPropertyA(2, val_range=(0,20), immediate=True)
def __init__(self, name, parent, id, sizer, pos): ManagedBase.__init__(self, name, 'wxSpinCtrlDouble', parent, id, sizer, pos) EditStylesMixin.__init__(self) # initialise instance properties self.range = np.FloatRangePropertyA("0.0, 100.0") self.value = np.SpinDoublePropertyA(0, val_range=(0.0, 100.0), immediate=True, default_value="") self.increment = np.SpinDoublePropertyD(1.0, val_range=(0.0, 100.0), immediate=True, default_value=1.0)
def __init__(self, name, parent, orientation, pos, create_slots=True): ManagedBase.__init__(self, name, 'wxSplitterWindow', parent, pos) EditStylesMixin.__init__(self) # initialise instance properties self.no_custom_class = np.CheckBoxProperty(False, default_value=False) self.sash_pos = np.SpinPropertyD(0, default_value="") if hasattr(wx, "SpinCtrlDouble"): self.sash_gravity = np.SpinDoublePropertyD(0.5, (0.0,1.0), default_value=0.0, immediate=True) else: self.sash_gravity = np.FloatPropertyD(0.5, (0.0,1.0), default_value=0.0) self.min_pane_size = np.SpinPropertyA(20) # hidden properties: orientation string, window names window_1, window_2 self.orientation = np.Property(orientation) self.window_1 = ChildWidgetNameProperty(0) self.window_2 = ChildWidgetNameProperty(1) self._window_old = None