This might be confusing but for some odd reason using ipadx
or ipady
in .pack()
with (1,0)
or like this: Label(root, text='Hello World').pack(ipadx=(1,0))
will always make this error: TclError: bad ipady value "1 0": must be positive screen distance
. Trying other things like: Label(root, text='Hello World').pack(ipadx=1)
work just fine. But This Said:
The padding options (padx, ipadx, pady and ipady) can take a 2-tuple that represent the left/right and top/bottom padding.
So, what is happening...
And here's some complete Code that has the error too:
from Tkinter import *
root = Tk()
Label(root, text='Hello World').pack(ipadx=(1, 0))
root.mainloop()
Update: I found that you can't do that in Tkinter, or even Tcl/Tk...