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 is a wx.Slider.", (45, 15))
|
2003-12-08 20:23:28 -05:00
|
|
|
|
|
|
|
slider = wx.Slider(
|
|
|
|
self, 100, 25, 1, 100, (30, 60), (250, -1),
|
|
|
|
wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS
|
|
|
|
)
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
slider.SetTickFreq(5, 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
overview = """\
|
2003-12-08 20:23:28 -05:00
|
|
|
A slider is a control with a handle which can be pulled back and forth to
|
|
|
|
change the value.
|
1999-04-29 23:29:54 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
In Windows versions below Windows 95, a scrollbar is used to simulate the slider.
|
|
|
|
In Windows 95, the track bar control is used.
|
|
|
|
|
|
|
|
"""
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05: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:])
|
1999-04-29 23:29:54 -04:00
|
|
|
|