]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/SpinCtrl.py
4 #----------------------------------------------------------------------
6 class TestPanel(wx
.Panel
):
7 def __init__(self
, parent
, log
):
8 wx
.Panel
.__init
__(self
, parent
, -1)
12 wx
.StaticText(self
, -1, "This example uses the wx.SpinCtrl control.", (45, 15))
13 sc
= wx
.SpinCtrl(self
, -1, "", (30, 50), (80, -1))
18 #----------------------------------------------------------------------
20 def runTest(frame
, nb
, log
):
21 win
= TestPanel(nb
, log
)
24 #----------------------------------------------------------------------
28 wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control.
30 Portable programs should try to use this control as wx.SpinButton is not
31 implemented for all platforms (Win32 and GTK only currently).
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
42 if __name__
== '__main__':
45 run
.main(['', os
.path
.basename(sys
.argv
[0])])