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
| use warnings;
use strict;
use Tk;
use Tk::TableMatrix;
my $fenetre_principale = MainWindow->new;
my $arrayVar = {};
for my $r ( 0 .. 7 ) {
for my $c ( 0 .. 7 ) {
$arrayVar->{"$r,$c"} = 'test';
}
}
my $tableau = $fenetre_principale->Scrolled(
'TableMatrix',
-variable => $arrayVar,
-selectmode => 'extended',
);
$tableau->tagConfigure(
'commande_dans_cellule',
-bg=>'white'
);
$tableau->pack( -expand => 1, -fill => 'both' );
my @lien;
my %lien_rs;
foreach my $i (1..5){
$lien[$i]= "http://google.fr";
$lien_rs{$i} = $fenetre_principale->Button(
-text => "Mon lien",
-command => sub{system($lien[$i]);}
);
$tableau->windowConfigure( "$i,5", -window => $lien_rs{$i});
}
MainLoop; |
Partager