home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>chooseColor - pops up a dialog box for the user to select a color.</TITLE>
- <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
- <LINK REV="made" HREF="mailto:">
- </HEAD>
-
- <BODY>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> chooseColor - pops up a dialog box for the user to select a color.</P></STRONG>
- </TD></TR>
- </TABLE>
-
- <A NAME="__index__"></A>
- <!-- INDEX BEGIN -->
-
- <UL>
-
- <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
-
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#description">DESCRIPTION</A></LI>
- <LI><A HREF="#example">EXAMPLE</A></LI>
- <LI><A HREF="#keywords">KEYWORDS</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>chooseColor - pops up a dialog box for the user to select a color.</P>
- <P>
- <HR>
- <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
- <UL>
- <LI>Linux</LI>
- <LI>Solaris</LI>
- <LI>Windows</LI>
- </UL>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <P> <EM>$color</EM> = <EM>$widget</EM>-><STRONG>chooseColor</STRONG>?(<EM>-option</EM>=><EM>value</EM>, ...)?;</P>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P>The method <STRONG>chooseColor</STRONG> is implemented as a perl wrapper
- on the core tk ``command'' <STRONG>tk_chooseColor</STRONG>. The <EM>$widget</EM>
- is passed as the argument to <STRONG>-parent</STRONG> described below.
- The implementation of internal <STRONG>tk_chooseColor</STRONG> is platform
- specific, on Win32 it is a native dialog, and on UNIX/X it is implemented
- in terms of <A HREF="../../../site/lib/Tk/ColorEditor.html">Tk::ColorEditor</A>.</P>
- <P>The core tk command <STRONG>tk_chooseColor</STRONG> pops up a dialog box for the
- user to select a color. The following <EM>option-value</EM> pairs are
- possible as command line arguments:</P>
- <DL>
- <DT><STRONG><A NAME="item_%2Dinitialcolor%3D%3Ecolor"><STRONG>-initialcolor</STRONG>=><EM>color</EM></A></STRONG><BR>
- <DD>
- Specifies the color to display in the color dialog when it pops
- up. <EM>color</EM> must be in a form acceptable to the <STRONG>Tk_GetColor</STRONG>
- function.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dparent%3D%3E%24widget"><STRONG>-parent</STRONG>=>$widget</A></STRONG><BR>
- <DD>
- Makes $widget the logical parent of the color dialog. The color
- dialog is displayed on top of its parent window.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dtitle%3D%3EtitleString"><STRONG>-title</STRONG>=><EM>titleString</EM></A></STRONG><BR>
- <DD>
- Specifies a string to display as the title of the dialog box. If this
- option is not specified, then a default title will be displayed.
- <P></P></DL>
- <P>If the user selects a color, <STRONG>tk_chooseColor</STRONG> will return the
- name of the color in a form acceptable to <STRONG>Tk_GetColor</STRONG>. If the
- user cancels the operation, the command will return <STRONG>undef</STRONG>.</P>
- <P>
- <HR>
- <H1><A NAME="example">EXAMPLE</A></H1>
- <PRE>
- $widget->configure(-fg => $parent->chooseColor(-initialcolor => 'gray',
- -title => "Choose color"));</PRE>
- <P>
- <HR>
- <H1><A NAME="keywords">KEYWORDS</A></H1>
- <P>color selection dialog</P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> chooseColor - pops up a dialog box for the user to select a color.</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-