Next / Previous / Contents / TCC Help System / NM Tech homepage

20.2. Swatch.setTextColor()

This method sets the text (foreground) color in the Text widget. The text color of a Text widget is its "fg" (foreground) attribute. The str() function on a Color instance returns the color's name in the "#RRGGBB" form.

huey
# - - -   S w a t c h . s e t T e x t C o l o r

    def setTextColor ( self, color ):
        """Sets the text color of self.__text.
        """
        self.__text["fg"]  =  str(color)