Next / Previous / Contents / Shipman's homepage

20.1. Class constants

These class variables contain constants used to configure the widget.

SWATCH_TEXT is the sample text that appears in the swatch initially.

    SWATCH_TEXT  =  (
        "The quick brown fox jumps over\n"
        "the lazy dog.\n"
        "0123456789 !\"#$%&'()*+,-./\n"
        ":;<=>?@[\\]^_/{|}~" )

These two constants specify the width in characters of the Text widget, and its height in lines.

    SWATCH_WIDE  =  40        # Width of the color swatch in characters
    SWATCH_HIGH  =  8         # Height of the color swatch in lines

The next constant specifies the number of font family names that will be visible at once in the font selector widget.

    FONT_FAMILIES  =  15