1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
import wx
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
class TestPanel(wx.Panel):
|
1999-04-30 03:29:54 +00:00
|
|
|
def __init__(self, parent, log):
|
2003-12-09 01:23:28 +00:00
|
|
|
wx.Panel.__init__(self, parent, -1)
|
1999-04-30 03:29:54 +00:00
|
|
|
self.log = log
|
|
|
|
self.count = 0
|
|
|
|
|
2004-01-13 03:17:17 +00:00
|
|
|
wx.StaticText(self, -1, "This example uses the wx.SpinCtrl control.", (45, 15))
|
2004-06-14 19:10:20 +00:00
|
|
|
sc = wx.SpinCtrl(self, -1, "", (30, 50))
|
2000-07-15 19:51:35 +00:00
|
|
|
sc.SetRange(1,100)
|
|
|
|
sc.SetValue(5)
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
overview = """\
|
2004-01-13 03:17:17 +00:00
|
|
|
wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2004-01-13 03:17:17 +00:00
|
|
|
Portable programs should try to use this control as wx.SpinButton is not
|
2003-12-09 01:23:28 +00:00
|
|
|
implemented for all platforms (Win32 and GTK only currently).
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
NB: the range supported by this control depends on the platform
|
|
|
|
but is at least -0x8000 to 0x7fff. Under GTK and Win32 with sufficiently new version
|
|
|
|
of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit
|
|
|
|
range is supported.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""
|
2003-07-02 23:13:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
2004-03-05 00:06:33 +00:00
|
|
|
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|