]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/Slider.py
Warning fixes and source cleaning.
[wxWidgets.git] / wxPython / demo / Slider.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 is a wx.Slider.", (45, 15))
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 )
18
19 slider.SetTickFreq(5, 1)
20
21
22
23 #----------------------------------------------------------------------
24
25 def runTest(frame, nb, log):
26 win = TestPanel(nb, log)
27 return win
28
29 #----------------------------------------------------------------------
30
31
32
33
34 overview = """\
35 A slider is a control with a handle which can be pulled back and forth to
36 change the value.
37
38 In Windows versions below Windows 95, a scrollbar is used to simulate the slider.
39 In Windows 95, the track bar control is used.
40
41 """
42
43
44 if __name__ == '__main__':
45 import sys,os
46 import run
47 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
48