]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/SpinCtrl.py
don't Printf() the string into itself (replaces patch 1655318)
[wxWidgets.git] / wxPython / demo / SpinCtrl.py
1
2 import wx
3
4 #----------------------------------------------------------------------
5
6 class TestPanel(wx.Panel):
7 def __init__(self, parent, log):
8 wx.Panel.__init__(self, parent, -1)
9 self.log = log
10 self.count = 0
11
12 wx.StaticText(self, -1, "This example uses the wx.SpinCtrl control.", (45, 15))
13 sc = wx.SpinCtrl(self, -1, "", (30, 50))
14 sc.SetRange(1,100)
15 sc.SetValue(5)
16
17
18 #----------------------------------------------------------------------
19
20 def runTest(frame, nb, log):
21 win = TestPanel(nb, log)
22 return win
23
24 #----------------------------------------------------------------------
25
26
27 overview = """\
28 wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control.
29
30 Portable programs should try to use this control as wx.SpinButton is not
31 implemented for all platforms (Win32 and GTK only currently).
32
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.
37
38
39 """
40
41
42 if __name__ == '__main__':
43 import sys,os
44 import run
45 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])