1tk_chooseColor(n)            Tk Built-In Commands            tk_chooseColor(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       tk_chooseColor - pops up a dialog box for the user to select a color.
9

SYNOPSIS

11       tk_chooseColor ?option value ...?
12______________________________________________________________________________
13

DESCRIPTION

15       The  procedure  tk_chooseColor pops up a dialog box for the user to se‐
16       lect a color. The following option-value pairs are possible as  command
17       line arguments:
18
19       -initialcolor color
20              Specifies  the color to display in the color dialog when it pops
21              up. color must be in a form acceptable to the Tk_GetColor  func‐
22              tion.
23
24       -parent window
25              Makes  window  the logical parent of the color dialog. The color
26              dialog is displayed on top of its parent window.
27
28       -title titleString
29              Specifies a string to display as the title of the dialog box. If
30              this  option is not specified, then a default title will be dis‐
31              played.
32
33       If the user selects a color, tk_chooseColor will return the name of the
34       color in a form acceptable to Tk_GetColor.  If the user cancels the op‐
35       eration, both commands will return the empty string.
36

EXAMPLE

38              button .b -bg [tk_chooseColor -initialcolor gray -title "Choose color"]
39

KEYWORDS

41       color, color selection, dialog
42
43
44
45Tk                                    4.2                    tk_chooseColor(n)
Impressum