Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / chooseColor.pod
CommitLineData
86530b38
AT
1# Copyright (c) 1996 Sun Microsystems, Inc.
2# See the file "license.terms" for information on usage and redistribution
3# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
4#
5#
6
7=head1 NAME
8
9chooseColor - pops up a dialog box for the user to select a color.
10
11=for category Popups and Dialogs
12
13=head1 SYNOPSIS
14
15S< >I<$color> = I<$widget>-E<gt>B<chooseColor>?(I<-option>=E<gt>I<value>, ...)?;
16
17=head1 DESCRIPTION
18
19The method B<chooseColor> is implemented as a perl wrapper
20on the core tk "command" B<tk_chooseColor>. The I<$widget>
21is passed as the argument to B<-parent> described below.
22The implementation of internal B<tk_chooseColor> is platform
23specific, on Win32 it is a native dialog, and on UNIX/X it is implemented
24in terms of L<Tk::ColorEditor|Tk::ColorEditor>.
25
26The core tk command B<tk_chooseColor> pops up a dialog box for the
27user to select a color. The following I<option-value> pairs are
28possible as command line arguments:
29
30=over 4
31
32=item B<-initialcolor>=E<gt>I<color>
33
34Specifies the color to display in the color dialog when it pops
35up. I<color> must be in a form acceptable to the B<Tk_GetColor>
36function.
37
38=item B<-parent>=E<gt>$widget
39
40Makes $widget the logical parent of the color dialog. The color
41dialog is displayed on top of its parent window.
42
43=item B<-title>=E<gt>I<titleString>
44
45Specifies a string to display as the title of the dialog box. If this
46option is not specified, then a default title will be displayed.
47
48=back
49
50If the user selects a color, B<tk_chooseColor> will return the
51name of the color in a form acceptable to B<Tk_GetColor>. If the
52user cancels the operation, the command will return B<undef>.
53
54=head1 EXAMPLE
55
56 $widget->configure(-fg => $parent->chooseColor(-initialcolor => 'gray',
57 -title => "Choose color"));
58
59=head1 KEYWORDS
60
61color selection dialog
62
63=cut
64