]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/SpinCtrl.py
1 # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
8 #----------------------------------------------------------------------
10 class TestPanel(wx
.Panel
):
11 def __init__(self
, parent
, log
):
12 wx
.Panel
.__init
__(self
, parent
, -1)
16 wx
.StaticText(self
, -1, "This example uses the wxSpinCtrl control.", (45, 15))
17 sc
= wx
.SpinCtrl(self
, -1, "", (30, 50), (80, -1))
23 #----------------------------------------------------------------------
25 def runTest(frame
, nb
, log
):
26 win
= TestPanel(nb
, log
)
29 #----------------------------------------------------------------------
33 wxSpinCtrl combines wxTextCtrl and wxSpinButton in one control.
35 Portable programs should try to use wxSpinCtrl instead as wxSpinButton is not
36 implemented for all platforms (Win32 and GTK only currently).
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
47 if __name__
== '__main__':
50 run
.main(['', os
.path
.basename(sys
.argv
[0])])