[Tkinter-discuss] Recommendations on when to use pack vs. grid layouts?

Michael Lange klappnase at web.de
Thu Dec 9 17:33:29 CET 2010

Thus spoketh python at bdurham.com 
unto us on Thu, 09 Dec 2010 10:52:39 -0500:

> Are there any best practice tips regarding when one should use
> pack vs. grid for their layouts?
> >From what I've been reading via google, the concencus seems to be
> that grid can handle any pack scenario but not vice-versa.

At least it's hard to figure out something that pack can do and grid
Imho it's better to use grid, if you cannot setup your layout with
pack without using extra frames. To tell the truth, I hardly ever use
pack at all, as far as I can see, the only advantage of pack is that it
takes 2 or 3 extra lines of code when you want to replace pack
(fill='both', expand=1) with grid.



.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

	"Life and death are seldom logical."
	"But attaining a desired goal always is."
		-- McCoy and Spock, "The Galileo Seven", stardate 2821.7

More information about the Tkinter-discuss mailing list