Google


Tk:choose-color

pops up a dialog box for the user to select a color.

SYNOPSIS

(tk:choose-Color ?option value ...?)

DESCRIPTION

This procedure is part of the STk library. The procedure Tk:choose-color pops up a dialog box for the user to select a color. The following option-value pairs are possible as command line arguments:

:initial-color color
Specifies the color to display in the color dialog when it pops up.

:title titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then an empty title will be displayed.

If the user selects a color, Tk:choose-color will return the name of the color. If the user cancels the operation, Tk:choose-color will return #f

EXAMPLE

(pack (button '.b :text "foo"
        :bg (Tk:choose-color :initial-color "gray" 
                             :title "Choose color")))

Back to the STk main page