]>
Commit | Line | Data |
---|---|---|
cf694132 | 1 | |
8fa876ca | 2 | import wx |
cf694132 | 3 | |
cf694132 RD |
4 | #---------------------------------------------------------------------- |
5 | ||
8fa876ca | 6 | class TestPanel(wx.Panel): |
cf694132 | 7 | def __init__(self, parent, log): |
8fa876ca | 8 | wx.Panel.__init__(self, parent, -1) |
cf694132 RD |
9 | self.log = log |
10 | self.count = 0 | |
11 | ||
95bfd958 | 12 | wx.StaticText(self, -1, "This example uses the wx.SpinCtrl control.", (45, 15)) |
6ab5d488 | 13 | sc = wx.SpinCtrl(self, -1, "", (30, 50)) |
f6bcfd97 BP |
14 | sc.SetRange(1,100) |
15 | sc.SetValue(5) | |
cf694132 RD |
16 | |
17 | ||
18 | #---------------------------------------------------------------------- | |
19 | ||
20 | def runTest(frame, nb, log): | |
21 | win = TestPanel(nb, log) | |
22 | return win | |
23 | ||
24 | #---------------------------------------------------------------------- | |
25 | ||
26 | ||
8fa876ca | 27 | overview = """\ |
95bfd958 | 28 | wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control. |
cf694132 | 29 | |
95bfd958 | 30 | Portable programs should try to use this control as wx.SpinButton is not |
8fa876ca | 31 | implemented for all platforms (Win32 and GTK only currently). |
cf694132 | 32 | |
8fa876ca RD |
33 | NB: the range supported by this control depends on the platform |
34 | but is at least -0x8000 to 0x7fff. Under GTK and Win32 with sufficiently new version | |
35 | of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit | |
36 | range is supported. | |
cf694132 RD |
37 | |
38 | ||
cf694132 | 39 | """ |
1fded56b RD |
40 | |
41 | ||
1fded56b RD |
42 | if __name__ == '__main__': |
43 | import sys,os | |
44 | import run | |
8eca4fef | 45 | run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) |