Пример #1
0
 def add_intspin(self, setting):
     '''add a spin control'''
     tab = self.panel(setting.tab)
     default = setting.value
     (minv, maxv) = setting.range
     ctrl = wx.SpinCtrl(tab, -1, initial=default, min=minv, max=maxv)
     self._add_input(setting, ctrl, value=default)
Пример #2
0
 def AddSpinInteger(self, label, min_value, max_value, default):
     c = wx.SpinCtrl(self.panel, -1)
     c.SetRange(min_value, max_value)
     c.SetValue(default)
     self.AddControl(c, label, default)
     self.row.Add(wx.StaticText(self.panel, label=label), 0, wx.LEFT, 20)
     self.row.Add(c, 0, wx.LEFT, 20)
     self.row.Add(wx.StaticText(self.panel, label=""), 0, wx.LEFT, 20)
     self.Bind(wx.EVT_SPINCTRL, self.OnValue)