Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello all: Could anyone can fix wh 1

Status
Not open for further replies.

stewang

Programmer
Aug 21, 2003
77
NZ
Hello all:
Could anyone fix my code. when I run it, it has some bugs. In here, I want to known how to use fill with frame.

my code as follow;

label .one -text one -background lightblue
label .two -text two -background lightgreen
label .three -text three -background yellow

pack .two -side right -fill both
pack .three -side left -fill both

frame frame2 configure -background red

pack configure .frame2 -fill x

thanks
 
A frame contains its child.
To make a widget the children of a frame .f just prepend .f before the path of the children:
Code:
  frame .f
  label .f.1 -text 1 -bg red
  label .f.2 -text 2 -bg blue
  pack .f .f.1 .f.2 -expand 1 -fill both
HTH

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top