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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| #!/usr/bin/perl
use warnings;
use strict;
use Tk;
use Tk::FileSelect;
use Tk::LabFrame;
my $txt = "Lancement";
my $i = 1;
my $filename;
my $b_var;
my $b_menu;
my $Lib;
use Menu;
SuiteWin();
Prog();
MainLoop;
sub SuiteWin {
# Cadre Gestion
my $cadre_gestion = $Menu::soft->LabFrame(
-label => 'Gestion',
-background => '#AA00FF',
);
# Start
my $bouton_start = $cadre_gestion->Button(
-text => "Start",
);
# Stop
my $bouton_stop = $cadre_gestion->Button(
-text => "Stop",
);
# Exit
my $bouton_exit = $cadre_gestion->Button(
-text => "Exit",
-command => [ \&Fermer, ],
);
# Label qui affichera les messages, en bas
my $label_message = $Menu::soft->Label(
-textvariable => \$Menu::Lib,
-background => '#FFE0D0',
-relief => 'groove',
);
####################################
# Gestion de l'affichage des widgets
#
$label_message->pack(qw / -side bottom -fill both -expand 0 /);
$cadre_gestion->pack(qw / -side right -fill both -expand 1 /);
$bouton_start->grid( $bouton_stop, $bouton_exit,
qw / -padx 2 -pady 5 -sticky nsew /
);
}
sub Prog {
Menu::Coucou;
}
sub Fermer {
exit (0);
} |
Partager