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 / BrowseEntry.pod
CommitLineData
86530b38
AT
1
2=head1 NAME
3
4Tk::BrowseEntry - entry widget with popup choices.
5
6=for pm Tixish/BrowseEntry.pm
7
8=for category Tix Extensions
9
10=head1 SYNOPSIS
11
12 use Tk::BrowseEntry;
13
14 $b = $frame->BrowseEntry(-label => "Label", -variable => \$var);
15 $b->insert("end", "opt1");
16 $b->insert("end", "opt2");
17 $b->insert("end", "opt3");
18 ...
19 $b->pack;
20
21=head1 DESCRIPTION
22
23BrowseEntry is a poor man's ComboBox. It may be considered an
24enhanced version of LabEntry which provides a button to popup the
25choices of the possible values that the Entry may
26take. BrowseEntry supports all the options LabEntry supports
27except B<-textvariable>. This is replaced by B<-variable>. Other
28options that BrowseEntry supports.
29
30=over 4
31
32=item B<-listwidth>
33
34Specifies the width of the popup listbox.
35
36=item B<-variable>
37
38Specifies the variable in which the entered value is to be stored.
39
40=item B<-browsecmd>
41
42Specifies a function to call when a selection is made in the
43popped up listbox. It is passed the widget and the text of the
44entry selected. This function is called after the entry variable
45has been assigned the value.
46
47=item B<-listcmd>
48
49Specifies the function to call when the button next to the entry
50is pressed to popup the choices in the listbox. This is called before
51popping up the listbox, so can be used to populate the entries in
52the listbox.
53
54=item B<-arrowimage>
55
56Specifies the image to be used in the arrow button beside the entry
57widget. The default is an downward arrow image in the file cbxarrow.xbm
58
59=item B<-choices>
60
61Specifies the list of choices to pop up. This is a reference to an
62array of strings specifying the choices.
63
64=item B<-state>
65
66Specifies one of three states for the widget: normal, readonly, or
67disabled. If the widget is disabled then the value may not be changed
68and the arrow button won't activate. If the widget is readonly, the
69entry may not be edited, but it may be changed by choosing a value
70from the popup listbox. normal is the default.
71
72=back
73
74=head1 METHODS
75
76=over 4
77
78=item B<insert(>I<index>, I<string>B<)>
79
80Inserts the text of I<string> at the specified I<index>. This string
81then becomes available as one of the choices.
82
83=item B<delete(>I<index1>, I<index2>B<)>
84
85Deletes items from I<index1> to I<index2>.
86
87=back
88
89=head1 BUGS
90
91BrowseEntry should really provide more of the ComboBox options.
92
93=head1 AUTHOR
94
95B<Rajappa Iyer> rsi@earthling.net
96
97B<Chris Dean> ctdean@cogit.com made additions.
98
99This code was inspired by ComboBox.tcl in Tix4.0 by Ioi Lam and
100bears more than a passing resemblance to ComboBox code. This may
101be distributed under the same conditions as Perl.
102
103=cut
104