home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>Tk::BrowseEntry - entry widget with popup choices.</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> Tk::BrowseEntry - entry widget with popup choices.</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="#methods">METHODS</A></LI>
- <LI><A HREF="#bugs">BUGS</A></LI>
- <LI><A HREF="#author">AUTHOR</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>Tk::BrowseEntry - entry widget with popup choices.</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>
- <PRE>
- use Tk::BrowseEntry;</PRE>
- <PRE>
- $b = $frame->BrowseEntry(-label => "Label", -variable => \$var);
- $b->insert("end", "opt1");
- $b->insert("end", "opt2");
- $b->insert("end", "opt3");
- ...
- $b->pack;</PRE>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P>BrowseEntry is a poor man's ComboBox. It may be considered an
- enhanced version of LabEntry which provides a button to popup the
- choices of the possible values that the Entry may
- take. BrowseEntry supports all the options LabEntry supports
- except <STRONG>-textvariable</STRONG>. This is replaced by <STRONG>-variable</STRONG>. Other
- options that BrowseEntry supports.</P>
- <DL>
- <DT><STRONG><A NAME="item_%2Dlistwidth"><STRONG>-listwidth</STRONG></A></STRONG><BR>
- <DD>
- Specifies the width of the popup listbox.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dvariable"><STRONG>-variable</STRONG></A></STRONG><BR>
- <DD>
- Specifies the variable in which the entered value is to be stored.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dbrowsecmd"><STRONG>-browsecmd</STRONG></A></STRONG><BR>
- <DD>
- Specifies a function to call when a selection is made in the
- popped up listbox. It is passed the widget and the text of the
- entry selected. This function is called after the entry variable
- has been assigned the value.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dlistcmd"><STRONG>-listcmd</STRONG></A></STRONG><BR>
- <DD>
- Specifies the function to call when the button next to the entry
- is pressed to popup the choices in the listbox. This is called before
- popping up the listbox, so can be used to populate the entries in
- the listbox.
- <P></P>
- <DT><STRONG><A NAME="item_%2Darrowimage"><STRONG>-arrowimage</STRONG></A></STRONG><BR>
- <DD>
- Specifies the image to be used in the arrow button beside the entry
- widget. The default is an downward arrow image in the file cbxarrow.xbm
- <P></P>
- <DT><STRONG><A NAME="item_%2Dchoices"><STRONG>-choices</STRONG></A></STRONG><BR>
- <DD>
- Specifies the list of choices to pop up. This is a reference to an
- array of strings specifying the choices.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dstate"><STRONG>-state</STRONG></A></STRONG><BR>
- <DD>
- Specifies one of three states for the widget: normal, readonly, or
- disabled. If the widget is disabled then the value may not be changed
- and the arrow button won't activate. If the widget is readonly, the
- entry may not be edited, but it may be changed by choosing a value
- from the popup listbox. normal is the default.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="methods">METHODS</A></H1>
- <DL>
- <DT><STRONG><A NAME="item_insert"><STRONG>insert(</STRONG><EM>index</EM>, <EM>string</EM><STRONG>)</STRONG></A></STRONG><BR>
- <DD>
- Inserts the text of <EM>string</EM> at the specified <EM>index</EM>. This string
- then becomes available as one of the choices.
- <P></P>
- <DT><STRONG><A NAME="item_delete"><STRONG>delete(</STRONG><EM>index1</EM>, <EM>index2</EM><STRONG>)</STRONG></A></STRONG><BR>
- <DD>
- Deletes items from <EM>index1</EM> to <EM>index2</EM>.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="bugs">BUGS</A></H1>
- <P>BrowseEntry should really provide more of the ComboBox options.</P>
- <P>
- <HR>
- <H1><A NAME="author">AUTHOR</A></H1>
- <P><STRONG>Rajappa Iyer</STRONG> <A HREF="mailto:rsi@earthling.net">rsi@earthling.net</A></P>
- <P><STRONG>Chris Dean</STRONG> <A HREF="mailto:ctdean@cogit.com">ctdean@cogit.com</A> made additions.</P>
- <P>This code was inspired by ComboBox.tcl in Tix4.0 by Ioi Lam and
- bears more than a passing resemblance to ComboBox code. This may
- be distributed under the same conditions as Perl.</P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::BrowseEntry - entry widget with popup choices.</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-