Button padx and pady
padx=Additional padding to the button in the horizontal direction.
pady=Additional padding to the button in the vertical direction.
***Your code Below*****
from tkinter import *
root = Tk()
root.title("PadX & PadY")
root.configure(background="#FFF8DC")
root.geometry("900x400+350+86")
btn =Button(root, text="Button", font=("times", 20, "bold"), padx=50,pady=20)
btn.pack(pady=30)
root.mainloop()
********End Code**********
Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.
إرسال تعليق