]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/wxSpinCtrl.py
reSWIGged
[wxWidgets.git] / wxPython / demo / wxSpinCtrl.py
... / ...
CommitLineData
1# 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2#
3# o Updated for wx namespace
4#
5
6import wx
7
8#----------------------------------------------------------------------
9
10class TestPanel(wx.Panel):
11 def __init__(self, parent, log):
12 wx.Panel.__init__(self, parent, -1)
13 self.log = log
14 self.count = 0
15
16 wx.StaticText(self, -1, "This example uses the wxSpinCtrl control.", (45, 15))
17 sc = wx.SpinCtrl(self, -1, "", (30, 50), (80, -1))
18 sc.SetRange(1,100)
19 sc.SetValue(5)
20 #sc.Enable(False)
21
22
23#----------------------------------------------------------------------
24
25def runTest(frame, nb, log):
26 win = TestPanel(nb, log)
27 return win
28
29#----------------------------------------------------------------------
30
31
32overview = """\
33wxSpinCtrl combines wxTextCtrl and wxSpinButton in one control.
34
35Portable programs should try to use wxSpinCtrl instead as wxSpinButton is not
36implemented for all platforms (Win32 and GTK only currently).
37
38NB: the range supported by this control depends on the platform
39but is at least -0x8000 to 0x7fff. Under GTK and Win32 with sufficiently new version
40of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit
41range is supported.
42
43
44"""
45
46
47if __name__ == '__main__':
48 import sys,os
49 import run
50 run.main(['', os.path.basename(sys.argv[0])])