changeset 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 95ba7e14d15a
children 7dbe8067acea
files Widgets/FlyingFader.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
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)