3 entries, 1 page |
1
2
my $FILESLIST_SCROLL = $FILESLIST -> Scrolled( "Listbox", -selectmode=>'multiple', -scrollbars => 'se', -height=>'5') -> pack (-side => 'left', -fill => 'both', -expand => '1' );
$FILESLIST_SCROLL -> insert('end', @all_files);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::Listbox;
my @array = qw(1 2 3 4);
my $mw = tkinit();
my $list = $mw->Scrolled('Listbox',
-scrollbars => 'osoe')->pack();
my $bt = $mw->Button(-text => 'Aenderung',
-command => \&change_array)->pack();
$list->insert('end',@array);
MainLoop;
sub change_array{
@array = qw(7 8 9 10 11 12 13 15 16);
$list->delete(0,'end');
$list->insert('end',@array);
}
3 entries, 1 page |