tkinter.FLATE


Definition
The create the Flate appear of the widget.

Syntax
relief="flate"

Examples
Here are tkinter widget appearance styles.
 from tkinter import*


master=Tk()
master.title("Style options in tkinter")

labelframe=LabelFrame(master, text="Button Styles")
labelframe.grid(row=0,column=0)

flat_button=Button(labelframe, text="Flat Button", font=10,  relief="flat")
flat_button.grid(row=1, column=0)


groove_button=Button(labelframe, text="Groove Button", font=10,  relief="groove")
groove_button.grid(row=2, column=0)


raised_button=Button(labelframe, text="Raised Button", font=10,  relief="raised")
raised_button.grid(row=3, column=0)


ridge_button=Button(labelframe, text="Ridge Button", font=10,  relief="ridge")
ridge_button.grid(row=4, column=0)


solid_button=Button(labelframe, text="Solid Button", font=10,  relief="solid")
solid_button.grid(row=5, column=0)


sunken_button=Button(labelframe, text="Sunken Button", font=10,  relief="sunken")
sunken_button.grid(row=6, column=0)



labelframe1=LabelFrame(master, text="Entry Styles")
labelframe1.grid(row=0, column=1)

flat_entry=Entry(labelframe1, font=10,  relief="flat")
flat_entry.grid(row=1, column=2)

label=Label(labelframe1, text="Flat Entry")
label.grid(row=1, column=1)
    
groove_entry=Entry(labelframe1, font=10,  relief="groove")
groove_entry.grid(row=2, column=2)

label=Label(labelframe1, text="Groove Entry")
label.grid(row=2, column=1)


raised_entry=Entry(labelframe1, font=10,  relief="raised")
raised_entry.grid(row=3, column=2)

label=Label(labelframe1, text="Raised Entry")
label.grid(row=3, column=1)

ridge_entry=Entry(labelframe1, font=10,  relief="ridge")
ridge_entry.grid(row=4, column=2)

label=Label(labelframe1, text="Ridge Entry")
label.grid(row=4, column=1)

solid_entry=Entry(labelframe1, font=10,  relief="solid")
solid_entry.grid(row=5, column=2)

label=Label(labelframe1, text="Solid Entry")
label.grid(row=5, column=1)

sunken_entry=Entry(labelframe1, font=10,  relief="sunken")
sunken_entry.grid(row=6, column=2)

label=Label(labelframe1, text="Sunken Entry")
label.grid(row=6, column=1)


master.mainloop()




tkinter


Comments