# interface de la page 1 : edition d' URL... #------------------------------------------------------------ $group1 = 1; # set default value foreach (qw/URL Fichier.txt/) { my $rdbtt=$page1->Radiobutton(-text => $_, -variable => \$group1, -value => $_,-foreground=>'brown')->pack(-anchor => 'w',-side => 'top', -fill => 'both',-expand=>'0'); } my $cadreP1=$page1->Frame(-borderwidth => '2', -relief => 'groove')->pack(-side => 'top', -fill => 'both',-expand=>'0'); $cadreP1->configure(-background => 'white'); my $cadreP2b=$page1->Frame(-borderwidth => '2', -relief => 'groove')->pack(-side => 'top', -fill => 'both',-expand=>'0'); $cadreP2b->configure(-background => 'white'); my $cadreP2=$page1->Frame(-borderwidth => '2', -relief => 'groove')->pack(-side => 'top', -fill => 'both',-expand=>'1'); $cadreP2->configure(-background => 'white' ); my $URL=$cadreP1->Label(-text => "Chemin: ", -relief => 'raised',-foreground=>'brown')->pack(-side => 'left', -anchor => 'n', -fill => 'y' ); $balloon->attach($URL, -balloonmsg => "chemin du ficher à analyser ", -statusmsg => "saisir le chemin du fichier à analyser "); $balloon->attach($msgarea, -msg => 'Affiche des précisions concernant les fonctions du logiciel '); $cadreP1->Entry(-textvariable => \$url)->pack(-side => 'left', -anchor => 'n', -fill => 'both', -expand => 1); my $go_button = $cadreP1->Button(-text => 'commencer',-background=>'#BFBFBF',-foreground=>'brown',-relief => 'raised',-command =>sub{dialogbox();})->pack(-side => 'left', -anchor => 'e' ); $balloon->attach($go_button, -balloonmsg => "Commencer à analyser ", -statusmsg => "Commence l'analyse du texte"); #--------------------------- editeur fenetre principale ------------------------------------------------------------------------------ $editortexte = $cadreP2->Scrolled("Text")->pack(-side => 'bottom', -fill => 'both', -expand => 1); $editortexte->Text(-setgrid => 'true'); $search_string = ''; $w_string = $cadreP2b->Frame()->pack(-side => 'top', -fill => 'x'); $w_string_label = $w_string->Label(-text => 'Rechercher chaine de caractères:', -width => 30, -anchor => 'w',-foreground=>'brown'); $w_string_entry = $w_string->Entry(-textvariable => \$search_string); $w_string_button = $w_string->Button(-text => 'Surligner',-foreground=>'brown',-background=>'#BFBFBF'); $balloon->attach($w_string_button, -balloonmsg => "Surliger une chaine de caractères ", -statusmsg => "Met en relief la chaîne de caractères recherchée"); $w_string_label->pack(-side => 'left'); $w_string_entry->pack(-side => 'left'); $w_string_button->pack(-side => 'left', -pady => 5, -padx => 10); $w_string->pack(-side => 'top', -fill => 'x'); $w_string_button->configure(-command => [sub {&text_search($editortexte, $search_string, 'search')}, $editortexte]); $w_string_entry->bind('' => [sub {shift; &text_search($editortexte, $search_string, 'search')}, $editortexte]); $w_string->pack(-side => 'top', -fill => 'x'); if ($mw->depth > 1) { text_toggle($editortexte, ['configure', 'search', -background => 'brown', -foreground => 'white'], 800, ['configure', 'search', -background => undef, -foreground => undef], 200); } else { text_toggle($editortexte, ['configure', 'search', -background => 'brown', -foreground => 'white'], 800, ['configure', 'search', -background => undef, -foreground => undef], 200); } my $cadreP3=$mw->Frame(-borderwidth => '2', -relief => 'groove')->pack(-side => 'top', -fill => 'both',-expand=>'0'); $cadreP3->configure(-background => 'brown');