Reputation: 23
So I want to reconfigure some of my rows to have a higher padding on the bottom but I can't seem to use the config function with a tuple.
This code below returns a _tkinter.TclError: bad screen distance "0 5"
.
for k in [2,5,7]:
self.accounts[k].config(pady = (0,5), bg = "yellow")
#accounts is a list of frames
Upvotes: 0
Views: 121
Reputation: 385970
Widgets don't accept a padding that is a tuple. The tuple is only supported as arguments to pack
and grid
. You'll need to specify the pady
by calling grid_configure
, assuming you're using grid
.
for k in [2,5,7]:
self.accounts[k].config(bg = "yellow")
self.accounts[k].grid_configure(pady = (0,5))
Upvotes: 1