[Tutor] help with Tkinter, please

Michael Lange klappnase at freenet.de
Sun Nov 26 17:59:20 CET 2006


On Sat, 25 Nov 2006 17:23:39 -0800
Dick Moores <rdm at rcblue.com> wrote:

> I've done a lot of fiddling around with setting "side=left", and 
> trying to put all the buttons inside a second Frame inside the first 
> one, but I can't get the layout I want, which is the Label on top of 
> the Entry, then a row of the first 3 buttons (which respectively 
> trigger 3 different computations on the integer the user enters). 
> Then below that, the Exit button, with the Text widget at the bottom. 
> How to do this? Is it impossible with the pack() method?
> 

It is certainly not impossible, as long as you do not mind creating
a bunch of extra Frames, however to me this really sound like a
job for grid() .
You could simply use grid(row=<xx>  , column=0, columnspan=2)
for the widgets that should use the whole window's width and grid
the 3 buttons into columns 0, 1 and 2 .

Michael



More information about the Tutor mailing list