as grids or as row frames with fixed-width labelsso that labels and entry fields line up horizontally as expected on all platforms (as we learnedcolumn frames don' work reliablybecause they may misalign rowsalthough grids and row frames are roughly the same amount of workgrids are useful if calculating maximum label width is inconvenient moreovergrids also apply to tables more complex than forms as we'll seethoughfor input formsgrid doesn' offer substantial code or complexity savings compared to equivalent packer solutionsespecially when things like resizability are added to the gui picture in other wordsthe choice between the two layout schemes is often largely one of stylenot technology grid basicsinput forms revisited let' start off with the basicsexample - lays out table of labels and entry fields-widgets we've already met herethoughthey are arrayed on grid example - pp \gui\tour\grid\grid py from tkinter import colors ['red''green''orange''white''yellow''blue' for in colorslabel(text=crelief=ridgewidth= grid(row=rcolumn= entry(bg=crelief=sunkenwidth= grid(row=rcolumn= + mainloop(gridding assigns widgets to row and column numberswhich both begin at number tkinter uses these coordinatesalong with widget size in generalto lay out the container' display automatically this is similar to the packerexcept that rows and columns replace the packer' notion of sides and packing order when runthis script creates the window shown in figure - pictured with data typed into few of the input fields once againthis book won' do justice to the colors displayed on the rightso you'll have to stretch your imagination little (or run this script on computer of your owndespite its colorsthis is really just classic input form layout againof the same kind we met in the prior labels on the left describe data to type into entry fields on the right herethoughwe achieve the layout with gridding instead of packed frames just for funthis script displays color names on the left and the entry field of the corresponding color on the right it achieves its table-like layout with these lineslabelgrid(row=rcolumn= entrygrid(row=rcolumn= grids