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
14

DESCRIPTION

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

EXAMPLE

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

KEYWORDS

43       color selection dialog
44
45
46
47Tk                                    4.2                    tk_chooseColor(n)
Impressum