for color in colorslab label(roottext=colorrelief=ridgewidth= ent entry(rootbg=colorrelief=sunkenwidth= lab grid(row=rowcolumn= sticky=nsewent grid(row=rowcolumn= sticky=nsewroot rowconfigure(rowweight= row + root columnconfigure( weight= root columnconfigure( weight= def packbox(root)label(roottext='pack'pack(for color in colorsrow frame(rootlab label(rowtext=colorrelief=ridgewidth= ent entry(rowbg=colorrelief=sunkenwidth= row pack(side=topexpand=yesfill=bothlab pack(side=leftexpand=yesfill=bothent pack(side=rightexpand=yesfill=bothroot tk(gridbox(toplevel(root)packbox(toplevel(root)button(roottext='quit'command=root quitpack(mainloop(when runthis script makes the scene in figure - it builds distinct pack and grid windows againwith entry fields on the right colored redwhiteand blue (or for readers not working along on computergraywhiteand marginally darker grayfigure - grid and pack windows before resizing this timethoughresizing both windows with mouse drags makes all their embedded labels and entry fields expand along with the parent windowas we see in figure - (with text typed into the formgrids