This method is called whenever the
Adjuster widget changes the color that it shows. It gets two
arguments. The first argument is 0 for background, 1 for
text color. The second argument is the new color. It
passes that new color on to the
widget to be displayed; for these methods, see Section 20, “
class Swatch: Font and color samples”.
# - - - A p p l i c a t i o n . _ _ a d j u s t H a n d l e r def __adjustHandler ( self, isText, newColor ): """Handler for the Adjuster widget. [ newColor is a Color instance -> if isText -> self := self with its Swatch displaying its text in color (newColor) else -> self := self with its Swatch displaying its background in color (newColor) ] """ if isText: self.__swatch.setTextColor ( newColor ) else: self.__swatch.setBgColor ( newColor )