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