diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl new file mode 100644 index 00000000000..ce32f13934b --- /dev/null +++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl @@ -0,0 +1,34 @@ +# BrowseEntry, entry with listbox to select list values. + +use Tk::BrowseEntry; + +my $month = "January"; + +outer: +{ + my $top = MainWindow->new; + my $f = $top->Frame; + my $c = $f->BrowseEntry(-label => "Month:", -variable => \$month); + $c->pack; + $c->insert("end", "January"); + $c->insert("end", "February"); + $c->insert("end", "March"); + $c->insert("end", "April"); + $c->insert("end", "May"); + $c->insert("end", "June"); + $c->insert("end", "July"); + $c->insert("end", "August"); + $c->insert("end", "September"); + $c->insert("end", "October"); + $c->insert("end", "November"); + $c->insert("end", "December"); + my $bf = $f->Frame; + $bf->Button(-text => "Print value", + -command => sub { + print "The month is $month\n"; + }, -relief => "raised")->pack; + + $bf->pack; + $f->pack; + MainLoop; +} |