J'ai un petit probleme avec les grids ....
je definis deux labelframe et dans chacune d'entre elles je mets une
grille. J'aimerai que les grilles aient la meme largeur dans les deux
labelframe, c'est a dire que, comme les labelframes, elles se
comportent comme si on avait mis une option -fill x . Mais -fill
n'existe pas pour les grilles. Comment faire ?
(je joins le petit script suivant pour exemple)
Merci de votre aide !!
--- Luc Moulinier
--- Laboratoire de Biologie et Genomique Integratives
--- 1, laurent Fries
--- 67 404 Illkirch cedex FRANCE
labelframe .f1 -text "Frame 1"
pack .f1 -fill x
labelframe .f2 -text "Frame 2"
pack .f2 -fill x
entry .f1.e -bg white -bd 2
button .f1.b1 -text "button 1 f1"
button .f1.b2 -text "The button 2 of f1"
button .f1.b3 -text "b 3 f1"
button .f1.b4 -text "button 4 f1"
grid .f1.e -row 0 -column 0 -columnspan 2
grid .f1.b1 -row 0 -column 2
grid .f1.b2 -row 1 -column 0
grid .f1.b3 -row 1 -column 1
grid .f1.b4 -row 1 -column 2
button .f2.b1 -text "button 1 f2"
button .f2.b2 -text "button 2 f2"
grid .f2.b1 -row 0 -column 0
grid .f2.b2 -row 0 -column 1
Je pense que quelque chose comme ca pourrait te convenir :
(j'ai rajouté un poids aux colonnes (pour qu'elles s'expansent),
et un -sticky nsew pour que chaque objet occupe toute sa place)
labelframe .f1 -text "Frame 1"
pack .f1 -fill x
labelframe .f2 -text "Frame 2"
pack .f2 -fill x
entry .f1.e -bg white -bd 2
button .f1.b1 -text "button 1 f1"
button .f1.b2 -text "The button 2 of f1"
button .f1.b3 -text "b 3 f1"
button .f1.b4 -text "button 4 f1"
grid .f1.e -row 0 -column 0 -columnspan 2 -sticky nsew
grid .f1.b1 -row 0 -column 2 -sticky nsew
grid .f1.b2 -row 1 -column 0 -sticky nsew
grid .f1.b3 -row 1 -column 1 -sticky nsew
grid .f1.b4 -row 1 -column 2 -sticky nsew
button .f2.b1 -text "button 1 f2"
button .f2.b2 -text "button 2 f2"
grid .f2.b1 -row 0 -column 0 -sticky nsew
grid .f2.b2 -row 0 -column 1 -sticky nsew
grid columnconfigure .f2 0 -weight 1
grid columnconfigure .f2 1 -weight 1
grid columnconfigure .f1 0 -weight 1
grid columnconfigure .f1 1 -weight 1
grid columnconfigure .f1 2 -weight 1
--
Pascal