]>
Commit | Line | Data |
---|---|---|
1 | # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) | |
2 | # | |
3 | # o Updated for wx namespace | |
4 | # | |
5 | ||
6 | import wx | |
7 | ||
8 | #---------------------------------------------------------------------- | |
9 | ||
10 | class 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 | ||
25 | def runTest(frame, nb, log): | |
26 | win = TestPanel(nb, log) | |
27 | return win | |
28 | ||
29 | #---------------------------------------------------------------------- | |
30 | ||
31 | ||
32 | overview = """\ | |
33 | wxSpinCtrl combines wxTextCtrl and wxSpinButton in one control. | |
34 | ||
35 | Portable programs should try to use wxSpinCtrl instead as wxSpinButton is not | |
36 | implemented for all platforms (Win32 and GTK only currently). | |
37 | ||
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. | |
42 | ||
43 | ||
44 | """ | |
45 | ||
46 | ||
47 | if __name__ == '__main__': | |
48 | import sys,os | |
49 | import run | |
50 | run.main(['', os.path.basename(sys.argv[0])]) |