Because of the way it is packed, the white box would fill its slice. Figure 13.3c is like Figure 13.3b but the middle slice is configured to expand vertically as well as horizontally. When multiple slices expand in the same space, pack allocates space between them in a way that is roughly proportional to their sizes. Using -fill options. Use -fill both to make a widget fill its slice at all times.
Vertical slices expand vertically.
Horizontal slices expand horizontally. Use -expand true to make any slice expand in both directions. Remember that invisible frames whose purpose is to contain other slicings are governed by the same principles. Write a script that slices the root window into three colored boxes and two padding frames arranged in a horizontal line. Solution Exercise 13.3c Pack a 1 centimeter square red box in such a way that it stays centered in the root window as the user expands and contracts it.