Issue
I try to understand the difference between padx of a widget and ipadx of the pack method for that widget.
from tkinter import *
window = Tk()
Button(window, text="aaaaaa", padx=50).pack()
Button(window, text="aaaaaa").pack(ipadx=50)
window.mainloop()
On my system the second button is two pixels wider. Shouldn't both buttons have the same width?
Initially I thought, the difference to be related to the border of the buttons but regardless of border_width, the difference of two pixels remains.
I understand the difference between ipadx and padx within pack() but expected ipadx of pack to be equivalent to padx of the widget.
Solution
Since the default value of padx
option is 1 for a Button
widget, that is why the second button is 2 pixels wider than the first button.
Answered By - acw1668
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.