]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/Slider.py
Some little tweaks
[wxWidgets.git] / wxPython / demo / Slider.py
CommitLineData
cf694132 1
8fa876ca 2import wx
cf694132 3
cf694132
RD
4#----------------------------------------------------------------------
5
8fa876ca 6class TestPanel(wx.Panel):
cf694132 7 def __init__(self, parent, log):
8fa876ca 8 wx.Panel.__init__(self, parent, -1)
cf694132
RD
9 self.log = log
10 self.count = 0
11
95bfd958 12 wx.StaticText(self, -1, "This is a wx.Slider.", (45, 15))
8fa876ca
RD
13
14 slider = wx.Slider(
15 self, 100, 25, 1, 100, (30, 60), (250, -1),
16 wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS
17 )
cf694132 18
cf694132
RD
19 slider.SetTickFreq(5, 1)
20
21
22
23#----------------------------------------------------------------------
24
25def runTest(frame, nb, log):
26 win = TestPanel(nb, log)
27 return win
28
29#----------------------------------------------------------------------
30
31
32
33
1e4a197e 34overview = """\
8fa876ca
RD
35A slider is a control with a handle which can be pulled back and forth to
36change the value.
cf694132 37
8fa876ca
RD
38In Windows versions below Windows 95, a scrollbar is used to simulate the slider.
39In Windows 95, the track bar control is used.
40
41"""
cf694132
RD
42
43
1e4a197e
RD
44if __name__ == '__main__':
45 import sys,os
46 import run
8eca4fef 47 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
cf694132 48