The following example illustrates how to use frames in a Tk window. Possible relief effects are raised, sunken, flat, ridge, solid, and groove. The raised and sunken effects would make the frame look like a button which is not currently being pressed (raised) or like a button which is currently being pressed (sunken).
The frame creates a container inside another container. It is useful for complex widget layout, or to combine two different managers in the same Tk window. The following code first uses tkpack() to place areas at the to and the left of the window. Then, it uses tkgrid() to layout a series of widgets inside a frame.
The code above produces the following window:
Try resizing the window to see that the labels at top, bottom and left are nicely resized too. The content of the frame is not resized here.