1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
import wx
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
class TestPanel(wx.Panel):
|
1999-04-30 03:29:54 +00:00
|
|
|
def __init__(self, parent, log):
|
2003-12-09 01:23:28 +00:00
|
|
|
wx.Panel.__init__(self, parent, -1)
|
1999-04-30 03:29:54 +00:00
|
|
|
self.log = log
|
|
|
|
self.count = 0
|
|
|
|
|
2004-01-13 03:17:17 +00:00
|
|
|
wx.StaticText(self, -1, "This is a wx.Slider.", (45, 15))
|
2003-12-09 01:23:28 +00:00
|
|
|
|
|
|
|
slider = wx.Slider(
|
|
|
|
self, 100, 25, 1, 100, (30, 60), (250, -1),
|
|
|
|
wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS
|
|
|
|
)
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
slider.SetTickFreq(5, 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-03-25 06:35:27 +00:00
|
|
|
overview = """\
|
2003-12-09 01:23:28 +00:00
|
|
|
A slider is a control with a handle which can be pulled back and forth to
|
|
|
|
change the value.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00: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-30 03:29:54 +00:00
|
|
|
|
|
|
|
|
2003-03-25 06:35:27 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
2004-03-05 00:06:33 +00:00
|
|
|
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|
1999-04-30 03:29:54 +00:00
|
|
|
|