0

All - I am trying to learn Grid Manager in tkinter. One concept I havent yet able to understand is what is the size of a row and column. For example, If I am thinking of a entry box to be on left side, what should be my column value. I have tried to google it, but I am yet to understand it.Can anyone explain that to me or give me any link that will help me understand it better.

Regards, Tushar

Tushar Saurabh
  • 687
  • 2
  • 13
  • 27
  • Perhaps this question could be of some help : http://stackoverflow.com/questions/1441134/tkinter-grid-geometry-manager-size-propagation-with-sticky or this tutorial :http://www.tkdocs.com/tutorial/grid.html – Alicia Jul 22 '13 at 15:40
  • the tkdoc says - The width of each column (or height of each row) depends on the width or height of the widgets contained within the column or row. This means when sketching out your user interface, and dividing it into rows and columns, you don't need to worry about each column or row being equal width. When I create a frame, it is empty so what is the cell size. Moreover, if cell takes the size of widget, then why do we need rowspan or colspan because whether we are making the width of widget as 10 or 20, the cell will resize to same width, basically I am still confused regarding cell size. – Tushar Saurabh Jul 23 '13 at 00:08

1 Answers1

0

The size of a row or a column will automatically be the size of the largest sized object in that row of column, unless you use the columnspan argument in the grid() call.

You mentioned you want it to be on the left hand side, then you need to give the grid() a sticky argument.

button.grid(row=0, column=0, sticky=W)

Read more

The-IT
  • 660
  • 8
  • 19