I just started python tkinter today, and i am not able to differentiate between what the 'width' function does and what 'padx' does, could you please explain each of them to me.
I just started python tkinter today, and i am not able to differentiate between what the 'width' function does and what 'padx' does, could you please explain each of them to me.
The padx is nothing but padding inside the layout, X indicates the x axis. The elements inside the layout tells that it needs more space inside the layout than what is allocated.
width which you already know is distance from one side to another side.
It's just like in web development. Let me provide a simple drawing example on width vs padx
Example you have two boxes or you can imagine them as widgets now width is just the width of your BOX or Widget. Now for padx is just the space (green stuffs) within your widget or box you can see the difference from the drawing that I provided.