The relief style of a widget refers to certain simulated 3-D effects around the outside of the widget. Here is a screenshot of a row of buttons exhibiting all the possible relief styles.
Here is list of possible constants which can be used for relief attribute −
from tkinter import * import tkinter top = Tk() B1 = Button(top, text ="FLAT", relief=FLAT ) B2 = Button(top, text ="RAISED", relief=RAISED ) B3 = Button(top, text ="SUNKEN", relief=SUNKEN ) B4 = Button(top, text ="GROOVE", relief=GROOVE ) B5 = Button(top, text ="RIDGE", relief=RIDGE ) B1.pack() B2.pack() B3.pack() B4.pack() B5.pack() top.mainloop()
When the above code is executed, it produces the following result −
python_gui_programming.htm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4