Relief in Tkinter Button
Relief represents the type of the border. It can be FLAT,SUNKEN, RAISED, GROOVE, and RIDGE.
******Your code Below*****
from tkinter import *
root= Tk()
root.title("Relief Example")
root.config(background="#FFF8DC")
root.geometry("900x500+350+86")
btn1= Button(root, text="Normal Button ",font=("Times", 20, "bold"),padx=20, pady=10,bd=10)
btn2= Button(root, text="SUNKEN",font=("Times", 20, "bold"),padx=20, pady=7, relief=SUNKEN)
btn3= Button(root, text="RAISED",font=("Times", 20, "bold"),padx=20, pady=7,relief=RAISED,bd=10)
btn4= Button(root, text="GROOVE",font=("Times", 20, "bold"),padx=20, pady=7,relief=GROOVE,bd=10)
btn5= Button(root, text="RIDGE",font=("Times", 20, "bold"),padx=20, pady=7,relief=RIDGE,bd=10)
btn1.pack(pady=5)
btn2.pack(pady=5)
btn3.pack(pady=5)
btn4.pack(pady=5)
btn5.pack(pady=5)
root.mainloop()
********End Code**********
Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.
إرسال تعليق