Bonjour,

j'aimerai vous demander s'il est possible de bien alligner les widgets contenus dans un grid ou non ?!

Pour commencer voici le code que j'utilise :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
{
 
 $main = new MainWindow( );
 
my $param_frame = $main->Frame( -relief => 'groove', 
                                                -borderwidth => 1
                                              )->pack( -side => 'top',
						            -fill => 'x' ) ; 
 
my @param = ('P000001','P002','P03','P00000004','P5') ;
my $p ;	
 
for ($p = 0 ; $p < scalar (@param)  ; $p++ )
{
 
   		$main ->minsize (350,436+($p*20));
 
 
   		my $particular_frame = $param_frame->Frame( -relief => 'groove', 
                                                -borderwidth => 0
                                              )->pack( -side => 'top',
						                               -fill => 'x' ) ;
 
   		my $name_title = $particular_frame ->Label() ;
   		$name_title->configure( -text => "$param[$p]" );
 
		my $param_title = $particular_frame ->Label() ;
   		$param_title->configure( -text => "Paramétrage" ) ;
 
		my $priority_title = $particular_frame ->Label() ;
   		$priority_title->configure( -text => " Priorité  " ) ;
 
   		my $param_textbox = $particular_frame ->Entry( -width => 20, 
                                               -background => 'white' 
                                             );
		my $priority_textbox = $particular_frame->Entry( -width => 7, 
                                               -background => 'white' 
                                             );
 
		$param_title->grid ( -column => 1 , - row => 0 ) ;
		$priority_title ->grid ( -column => 2 , - row => 0 ) ;
		$param_textbox ->grid ( -column => 1 , - row => 1 ) ;
		$priority_textbox->grid ( -column => 2 , - row => 1 ) ;
		$name_title->grid ( -column => 0 , - row => 1 ) ;
 
 
}
# Affichage d'un boutton 'Lancement' en bas à gauche
    	$build_button = 
      	$main->Button( -text => "Construire",
                             -width => 10, 
                   )->place(-x=> 1, -y => 28+($p*74),
	                        -height => 40,
			                -width => 115);
 
		# Bouton RaZ en bas de la fenetre 
    	$RaZ_button =
      	$main->Button(-text => "RaZ",
	                -width => 10,
	               )->place(-x=> 115, -y => 28+($p*74),
	                        -height => 40,
			                -width => 115);
 
		# Bouton quitter en bas de la fenetre
   		$quit_button = 
      	$main->Button( -text => " Quitter ",
                     -width => 10,
                     -command => sub { $main->destroy;} 							 
                   )->place(-x=> 230, -y => 28+($p*74),
	                        -height => 40,
			                -width => 115) ;
}
Un petit screen vaut mieux que des centaines de mots :

Nom : Capture-3.png
Affichages : 158
Taille : 10,7 Ko

Comme vous pouvez le constater ce n'est pas propre, j'aimerai donc savoir s'il y est possible de d'alligner tout ça et que ce soit moins sensible au nombre de caractères de mes élements contenus dans le tableau.

Et seconde question mais qui est plus de l'ordre du langage, en mettant la création d'Entry dans une boucle, elles auront toutes le même nom. J'aurai surement un problème pour récuperer les information de l'Entry 2 par exemple.
J'ai vu en parcourant le forum qu'en déclarant "use no strict " c'était possible mais pas très recommandé. De plus j'utilise "use strict"...

Dans l'attente de vos réponses, je poursuis mes investigations !

Cdlt, Xav.