diff light8/uihelpers.py @ 52:065896b0913c

emergency commit
author dmcc
date Mon, 08 Jul 2002 03:25:42 +0000
parents 71489bb71528
children a4d000f759b4
line wrap: on
line diff
--- a/light8/uihelpers.py	Sun Jul 07 15:40:45 2002 +0000
+++ b/light8/uihelpers.py	Mon Jul 08 03:25:42 2002 +0000
@@ -60,12 +60,13 @@
     label's on the button face, not to the side. the optional command
     callback is called on button set, not on unset. takes a variable
     just like a checkbutton"""
-    def __init__(self,parent,variable=None,command=None,**kw):
+    def __init__(self,parent,variable=None,command=None,downcolor='red',**kw):
 
         self.oldcommand = command
         Button.__init__(self,parent,command=self.invoke,**kw)
 
         self._origbkg = self.cget('bg')
+        self.downcolor = downcolor
 
         self._variable = variable
         if self._variable:
@@ -94,7 +95,7 @@
     def _setstate(self,newstate):
         self.state = newstate
         if newstate: # set
-            self.config(bg='red',relief='sunken')
+            self.config(bg=self.downcolor,relief='sunken')
         else: # unset
             self.config(bg=self._origbkg,relief='raised')
         return "break"