1 # -*- coding: utf-8 -*-
2 #!/usr/local/bin/python
4 from foztools import Slider
12 win.master.title("Slider Demo")
13 self.progress1=Slider(win, fillColor="red", labelColor="yellow",
14 value=0, width=200, height=15,
15 appearance="sunken", autoLabel="false",
17 labelText="Gary.Foster@corp.sun.com",
18 orientation="horizontal", bd=3)
19 self.progress2=Slider(win, fillColor="blue", labelColor="black",
20 background="white", value=250, width=50,
21 height=200, appearance="raised", max=250,
22 labelFormat="%d", orientation="vertical", bd=4)
23 self.progress1.frame.pack()
24 self.progress2.frame.pack()
26 self.progress1.frame.after(1000, self.update)
30 def update(self, event=None):
34 bar1.value=bar1.value+self.increment1
35 if bar1.value > bar1.max:
37 bar1.fillColor="green"
39 if bar1.value < bar1.min:
42 bar1.labelColor="yellow"
44 bar1.frame.after(100, self.update)
46 bar2.value=bar2.value+self.increment2
47 if bar2.value > bar2.max:
49 if bar2.value < bar2.min:
56 if __name__=="__main__":