diff Widgets/FlyingFader.py @ 15:c76b62eccdec

put **kw back in, they now go to the scale and can override the defaults. put **kw back in, they now go to the scale and can override the defaults. for our purposes, we probably want to edit the defaults so we don't have them in every call.
author dmcc
date Sun, 07 Jul 2002 06:18:40 +0000
parents c65119b66b00
children 053889940418
line wrap: on
line diff
--- a/Widgets/FlyingFader.py	Sun Jul 07 06:17:08 2002 +0000
+++ b/Widgets/FlyingFader.py	Sun Jul 07 06:18:40 2002 +0000
@@ -2,7 +2,8 @@
 from time import time
 
 class FlyingFader(Frame):
-    def __init__(self, master, variable, label, time=1.5, font=('Arial', 8)):
+    def __init__(self, master, variable, label, time=1.5, font=('Arial', 8),
+                 **kw):
         Frame.__init__(self, master)
         self.name = label
         self.variable = variable
@@ -11,8 +12,11 @@
         self.fadetimes = 0, 0
 
         self.config({'bd':1, 'relief':'raised'})
-        self.scale = Scale(self, variable=variable, showvalue=0, from_=100, 
-            to_=0, res=0.1, width=20, length=200)
+        scaleopts = {'variable' : variable, 'showvalue' : 0, 'from' : 100,
+                     'to' : 0, 'res' : 0.1, 'width' : 20, 'length' : 200}
+        scaleopts.update(kw)
+        
+        self.scale = Scale(self, scaleopts)
         self.vlabel = Label(self, text="0.0", font=font)
         self.label = Label(self, text=label, wraplength=40, font=font)