1999-04-29 23:29:54 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
import wx
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
class TestPanel(wx.Panel):
|
1999-04-29 23:29:54 -04:00
|
|
|
def __init__(self, parent, log):
|
2003-12-08 20:23:28 -05:00
|
|
|
wx.Panel.__init__(self, parent, -1)
|
1999-04-29 23:29:54 -04:00
|
|
|
self.log = log
|
|
|
|
self.count = 0
|
|
|
|
|
2004-01-12 22:17:17 -05:00
|
|
|
wx.StaticText(self, -1, "This example uses the wx.SpinCtrl control.", (45, 15))
|
2003-12-08 20:23:28 -05:00
|
|
|
sc = wx.SpinCtrl(self, -1, "", (30, 50), (80, -1))
|
2000-07-15 15:51:35 -04:00
|
|
|
sc.SetRange(1,100)
|
|
|
|
sc.SetValue(5)
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
overview = """\
|
2004-01-12 22:17:17 -05:00
|
|
|
wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control.
|
1999-04-29 23:29:54 -04:00
|
|
|
|
2004-01-12 22:17:17 -05:00
|
|
|
Portable programs should try to use this control as wx.SpinButton is not
|
2003-12-08 20:23:28 -05:00
|
|
|
implemented for all platforms (Win32 and GTK only currently).
|
1999-04-29 23:29:54 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
NB: the range supported by this control depends on the platform
|
|
|
|
but is at least -0x8000 to 0x7fff. Under GTK and Win32 with sufficiently new version
|
|
|
|
of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit
|
|
|
|
range is supported.
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
|
|
|
|
"""
|
2003-07-02 19:13:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
2004-03-04 19:06:33 -05:00
|
|
|
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|