Default padding for Tkinter grid

Amr amrbekhit at gmail.com
Mon May 4 09:27:49 EDT 2009


Hello all,

I've been spending the last few days experimenting with Tkinter. The
grid manager is nice and easy to use, but I have found that I am often
having to specify padx and pady options to every widget I add to my
grid. The way I am doing it is to create a dictionary:

paddding = {'padx': '1m', 'pady': '1m'}

and then apply it to the grid method using **padding.

However, I was wondering if there was a way of setting default padx
and pady controls for the grid, so that I can just call grid without
having to specify any extra parameters.

Thanks,

--Amr



More information about the Python-list mailing list