home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _b5607cd89498d390d48f90656c512b3c < prev    next >
Text File  |  2000-03-23  |  5KB  |  138 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Tk::BrowseEntry - entry widget with popup choices.</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Tk::BrowseEntry - entry widget with popup choices.</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#methods">METHODS</A></LI>
  26.     <LI><A HREF="#bugs">BUGS</A></LI>
  27.     <LI><A HREF="#author">AUTHOR</A></LI>
  28. </UL>
  29. <!-- INDEX END -->
  30.  
  31. <HR>
  32. <P>
  33. <H1><A NAME="name">NAME</A></H1>
  34. <P>Tk::BrowseEntry - entry widget with popup choices.</P>
  35. <P>
  36. <HR>
  37. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  38. <UL>
  39. <LI>Linux</LI>
  40. <LI>Solaris</LI>
  41. <LI>Windows</LI>
  42. </UL>
  43. <HR>
  44. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  45. <PRE>
  46.     use Tk::BrowseEntry;</PRE>
  47. <PRE>
  48.     $b = $frame->BrowseEntry(-label => "Label", -variable => \$var);
  49.     $b->insert("end", "opt1");
  50.     $b->insert("end", "opt2");
  51.     $b->insert("end", "opt3");
  52.     ...
  53.     $b->pack;</PRE>
  54. <P>
  55. <HR>
  56. <H1><A NAME="description">DESCRIPTION</A></H1>
  57. <P>BrowseEntry is a poor man's ComboBox. It may be considered an
  58. enhanced version of LabEntry which provides a button to popup the
  59. choices of the possible values that the Entry may
  60. take. BrowseEntry supports all the options LabEntry supports
  61. except <STRONG>-textvariable</STRONG>. This is replaced by <STRONG>-variable</STRONG>. Other
  62. options that BrowseEntry supports.</P>
  63. <DL>
  64. <DT><STRONG><A NAME="item_%2Dlistwidth"><STRONG>-listwidth</STRONG></A></STRONG><BR>
  65. <DD>
  66. Specifies the width of the popup listbox.
  67. <P></P>
  68. <DT><STRONG><A NAME="item_%2Dvariable"><STRONG>-variable</STRONG></A></STRONG><BR>
  69. <DD>
  70. Specifies the variable in which the entered value is to be stored.
  71. <P></P>
  72. <DT><STRONG><A NAME="item_%2Dbrowsecmd"><STRONG>-browsecmd</STRONG></A></STRONG><BR>
  73. <DD>
  74. Specifies a function to call when a selection is made in the
  75. popped up listbox. It is passed the widget and the text of the
  76. entry selected. This function is called after the entry variable
  77. has been assigned the value.
  78. <P></P>
  79. <DT><STRONG><A NAME="item_%2Dlistcmd"><STRONG>-listcmd</STRONG></A></STRONG><BR>
  80. <DD>
  81. Specifies the function to call when the button next to the entry
  82. is pressed to popup the choices in the listbox. This is called before
  83. popping up the listbox, so can be used to populate the entries in
  84. the listbox.
  85. <P></P>
  86. <DT><STRONG><A NAME="item_%2Darrowimage"><STRONG>-arrowimage</STRONG></A></STRONG><BR>
  87. <DD>
  88. Specifies the image to be used in the arrow button beside the entry
  89. widget. The default is an downward arrow image in the file cbxarrow.xbm
  90. <P></P>
  91. <DT><STRONG><A NAME="item_%2Dchoices"><STRONG>-choices</STRONG></A></STRONG><BR>
  92. <DD>
  93. Specifies the list of choices to pop up.  This is a reference to an
  94. array of strings specifying the choices.
  95. <P></P>
  96. <DT><STRONG><A NAME="item_%2Dstate"><STRONG>-state</STRONG></A></STRONG><BR>
  97. <DD>
  98. Specifies one of three states for the widget: normal, readonly, or
  99. disabled.  If the widget is disabled then the value may not be changed
  100. and the arrow button won't activate.  If the widget is readonly, the
  101. entry may not be edited, but it may be changed by choosing a value
  102. from the popup listbox.  normal is the default.
  103. <P></P></DL>
  104. <P>
  105. <HR>
  106. <H1><A NAME="methods">METHODS</A></H1>
  107. <DL>
  108. <DT><STRONG><A NAME="item_insert"><STRONG>insert(</STRONG><EM>index</EM>, <EM>string</EM><STRONG>)</STRONG></A></STRONG><BR>
  109. <DD>
  110. Inserts the text of <EM>string</EM> at the specified <EM>index</EM>. This string
  111. then becomes available as one of the choices.
  112. <P></P>
  113. <DT><STRONG><A NAME="item_delete"><STRONG>delete(</STRONG><EM>index1</EM>, <EM>index2</EM><STRONG>)</STRONG></A></STRONG><BR>
  114. <DD>
  115. Deletes items from <EM>index1</EM> to <EM>index2</EM>.
  116. <P></P></DL>
  117. <P>
  118. <HR>
  119. <H1><A NAME="bugs">BUGS</A></H1>
  120. <P>BrowseEntry should really provide more of the ComboBox options.</P>
  121. <P>
  122. <HR>
  123. <H1><A NAME="author">AUTHOR</A></H1>
  124. <P><STRONG>Rajappa Iyer</STRONG> <A HREF="mailto:rsi@earthling.net">rsi@earthling.net</A></P>
  125. <P><STRONG>Chris Dean</STRONG> <A HREF="mailto:ctdean@cogit.com">ctdean@cogit.com</A> made additions.</P>
  126. <P>This code was inspired by ComboBox.tcl in Tix4.0 by Ioi Lam and
  127. bears more than a passing resemblance to ComboBox code. This may
  128. be distributed under the same conditions as Perl.</P>
  129. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  130. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  131. <STRONG><P CLASS=block> Tk::BrowseEntry - entry widget with popup choices.</P></STRONG>
  132. </TD></TR>
  133. </TABLE>
  134.  
  135. </BODY>
  136.  
  137. </HTML>
  138.