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
   |  
#!/usr/bin/perl
use warnings;
use strict;
use Tk;    # Appel du module Tk
 
 
 
 
# Programme principal
# Création de la fenêtre
my $TOP = new MainWindow(
  -title      => 'Script Sorter',
  -background => 'white',
);
$TOP->minsize(400, 300);
 
#======================================================#
 
my $uds = 0;
my $suivant = 0;
 
 
my $boutonUDS = $TOP->Radiobutton(
        -text => 'UDS',
        -value => 1, 
        -variable => \$uds);
my $boutonSpecB = $TOP->Radiobutton(
        -text => 'SpecB', 
        -value => 0, 
        -variable => \$uds);
$boutonUDS->deselect;
$boutonSpecB->select;
 
my $boutonSuivant = $TOP->Button(
        -text    => 'Suivant',
        -command => [sub{$suivant=1} ,[sub{$TOP->update}]]
    );
 
 
if(!$suivant){
      $boutonUDS->grid(-row => 0, -column => 0);
      $boutonSpecB->grid(-row => 1, -column => 0);
      $boutonSuivant->grid(-row => 2, -column => 0);
}
#else{
#----- Le nouveau menu à afficher____#
#if(uds)
#etc
#}
mainloop; | 
Partager