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