from the perspective of the container windowthe label is gridded to column in the current row number ( counter that starts at and the entry is placed in column the upshot is that the grid system lays out all the labels and entries in two-dimensional table automaticallywith both evenly sized rows and evenly sized columns large enough to hold the largest item in each column that isbecause widgets are arranged by both row and column when griddedthey align properly in both dimensions although packed row frames can achieve the same effect if labels are fixed width (as we learned in )grids directly reflect the structure of tabular displaysthis includes input formsas well as larger tables in general the next section illustrates this difference in code comparing grid and pack time for some compare-and-contrastexample - implements the same sort of colorized input form with both grid and packto make it easy to see the differences between the two approaches example - pp \gui\tour\grid\grid py ""add equivalent pack window using row frames and fixed-width labelslabels and entrys in packed column frames may not line up horizontallysame length codethough enumerate built-in could trim lines off grid""from tkinter import colors ['red''green''orange''white''yellow''blue'def gridbox(parent)"grid by row/column numbersrow for color in colorslab label(parenttext=colorrelief=ridgewidth= ent entry(parentbg=colorrelief=sunkenwidth= lab grid(row=rowcolumn= ent grid(row=rowcolumn= tkinter tourpart