7 Einträge, 1 Seite |
1
2
$startmonth = $main->Scrolled('Listbox',-height => 1, -width => 5) ->grid(-row => 0, -column => ++$col);
$startmonth->insert('end', $_) for qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$mmdlistbox1 = $main->Scrolled('Listbox',
-height => 10
)
->grid(-row => 3, -column => ++$col);for my $mmdlist
(
'RADIO2/B10.2',
'---',
'---',
'---',
'---',
)
{
$mmdlistbox1->insert('end', $mmdlist);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl
use strict;
use warnings 'all';
use Tk;
my $mw = tkinit;
my $tf = $mw->Frame()->pack(qw/-fill both -expand 1/);
my @lb;
push(@lb, $tf->Listbox(-exportselection => 0)->pack(-side => "left"));
push(@lb, $tf->Listbox(-exportselection => 0)->pack(-side => "left"));
push(@lb, $tf->Listbox(-exportselection => 0)->pack(-side => "left"));
foreach (@lb)
{
$_->insert('end',"Test" );
$_->insert('end',"Test1");
$_->insert('end',"Test2");
$_->insert('end',"Test3");
}
$mw->Button(-text => "Werte ausgeben",
-command => sub {
foreach my$lb (@lb)
{
my @selected = $lb->curselection;
my $werte = "Werte: ";
$werte .= $lb->get($_) foreach @selected;
print "$werte\n";
}
})->pack(qw/-fill x -expand 1 -anchor n/);
MainLoop;
7 Einträge, 1 Seite |