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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
use strict;
use Tk::BrowseEntry;
use Tk 800;
use Tk::HList;
use Tk::Table ;
require Tk::Pane;
require Tk::LabFrame;
my $fenetre=();
my $pointer=();
my $saisie_device=();
my $select_device=();
my $t_infos =();
my @Etiquettes = (
'Identifiant : ' , 'Nom Prénom :' , 'Ville : ' , 'Code postal :' ,
'Téléphone :' , 'Fax :' , 'e-mail :','Identifiant : ' , 'Nom :' , 'Prénom :' , 'Ville : ' , 'Code postal :' ,
'Téléphone :' , 'Fax :' , 'e-mail :','Téléphone :' , 'Fax :' , 'e-mail :','Identifiant : ' , 'Nom :' , 'Prénom :' , 'Ville : ' , 'Code postal :' ,
'Téléphone :' , 'Fax :' , 'e-mail :'
) ;
my @Valeurs = ( ) ;
$fenetre = new MainWindow () ;
my $texte_du_message = () ;
my $var=();
$fenetre -> title ( "Création Input" ) ;
$fenetre->geometry("600x510");
my $frame=$fenetre->Frame(-relief => 'raised' ,
-borderwidth => 2,
-width =>600,
-height=>480
);
my $f1 = $frame->LabFrame(-label => "Configuration des champs",
-labelside => "acrosstop",
-width =>580,
-height=>440);
my $f2 = $frame->Frame(
-relief => 'sunken' ,
-borderwidth => 2 ,
-width =>520,
-height=>320);
my $nom_label = $f1-> Label ( -text => 'Nom de l\'Input' ) ;
my $device_label = $f1 -> Label ( -text => 'Device' ) ;
my $saisie_nom = $f1-> BrowseEntry(
-variable => \$pointer->{UTinput},
-command => sub{});
$saisie_device = $f1 -> BrowseEntry(
-variable => \$select_device,
-command => sub{});
$t_infos = $frame-> Scrolled ( "Frame", ,
-borderwidth => 2 ,
-width =>498,
-scrollbars => 'osoe',
-height=>299) ;
for (my $i = 0 ; $i <= $#Etiquettes ; $i++ )
{
$t_infos -> Label (
-text => $Etiquettes[$i] ,
-anchor => 'w'
) -> grid ( -row => $i , -column => 0 , -sticky => 'w' ) ;
$t_infos -> Entry (
-textvariable => \$Valeurs[$i]
) -> grid ( -row => $i , -column => 1 , -sticky => 'e' ) ;
$t_infos -> Entry (
-textvariable => \$Valeurs[$i]
) -> grid ( -row => $i , -column => 2 , -sticky => 'e' ) ;
}
$t_infos -> gridRemove($t_infos);
my $save_button = $f1 -> Button ( -text => 'Sauvegarder' ,
-command => sub{});
my $add_button = $f1 -> Button ( -text => 'Configurer' ,-width =>10,
-command => sub{});
my $suivant_button = $fenetre -> Button ( -text => 'Suivant' ,-width =>10,
-command => sub{});
my $precedent_button = $fenetre -> Button ( -text => 'Précédent' ,-width =>10,
-command => sub{
});
$frame ->place( -x => 0, -y => 0 );
$f1 ->place( -x => 4, -y => 4);
$f2 ->place( -x => 40, -y => 90);
$nom_label ->place( -x => 340, -y => 4);
$device_label ->place( -x => 340, -y => 25);
$saisie_nom ->place( -x => 425, -y => 4);
$saisie_device ->place( -x => 425, -y => 25);
$t_infos ->place( -x => 42, -y => 92);
$save_button ->place( -x => 500, -y => 405);
$add_button ->place( -x => 420, -y => 405);
$suivant_button ->place( -x => 527, -y => 485);
$precedent_button ->place( -x => 4, -y => 485);
MainLoop ( ) ; |
Partager