[tkinter] widget size adjustment

Pierre-Alain Dorange pdorange at pas-de-pub-merci.mac.com
Wed Jun 22 16:53:08 EDT 2016

Christian Gollwitzer <auriocus at gmx.de> wrote:

> If you do not see the background, then indeed the canvas is not resized,
> which means the gridding options are wrong. Looking at your code, I see
> this:
> self.map.grid(row=1,column=1,rowspan=4,columnspan=2,padx=2,pady=2)
> Here, you do not specify any sticky options, which means it should 
> default to centering. Try adding NSEW sticky options.

That's magic ! 
It works just fine...

If i do understand NSEW sticky option make the widget autoadjust to the
available space. The default option is just CENTERED... I do not explore
this, i just thought NSEW was also CENTERED.

Many Thanks.
Pierre-Alain Dorange        <http://microwar.sourceforge.net/>

Ce message est sous licence Creative Commons "by-nc-sa-2.0"

More information about the Python-list mailing list