]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-07/slider.py
don't use strlen() to verify the length of the string as it can contain embedded...
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-07 / slider.py
1 import wx
2
3 class SliderFrame(wx.Frame):
4 def __init__(self):
5 wx.Frame.__init__(self, None, -1, 'Slider Example',
6 size=(300, 350))
7 panel = wx.Panel(self, -1)
8 self.count = 0
9 slider = wx.Slider(panel, 100, 25, 1, 100, pos=(10, 10),
10 size=(250, -1),
11 style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS )
12 slider.SetTickFreq(5, 1)
13 slider = wx.Slider(panel, 100, 25, 1, 100, pos=(125, 70),
14 size=(-1, 250),
15 style=wx.SL_VERTICAL | wx.SL_AUTOTICKS | wx.SL_LABELS )
16 slider.SetTickFreq(20, 1)
17
18 if __name__ == '__main__':
19 app = wx.PySimpleApp()
20 frame = SliderFrame()
21 frame.Show()
22 app.MainLoop()