Leser: 1
|< 1 2 >| | 13 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
use Optionmenu;
my $selected;
$opt = $w->Optionmenu(
-options => [$val1,$val2,$val3],
-command => sub{ print $selected,"\n"},
-variable => \$selected,
);
print "Ausgewählt: $selected\n";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::BrowseEntry;
my $mw = tkinit;
my $var;
my $browse = $mw->BrowseEntry(
-variable => \$var,
-command => sub{print "gewaehlt: $var\n"},
)->pack();
for(qw/master renee crian ptk relais/){
$browse->insert('end',$_);
}
MainLoop;
|< 1 2 >| | 13 Einträge, 2 Seiten |