
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
- Python Advanced Tutorial
- Python - Classes/Objects
- Python - Reg Expressions
- Python - CGI Programming
- Python - Database Access
- Python - Networking
- Python - Sending Email
- Python - Multithreading
- Python - XML Processing
- Python - GUI Programming
- Python - Further Extensions
- Python Useful Resources
- Python - Questions and Answers
- Python - Quick Guide
- Python - Tools/Utilities
- Python - Useful Resources
- Python - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Python - Tkinter Relief styles
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.
- FLAT
- RAISED
- SUNKEN
- GROOVE
- RIDGE
Example
from Tkinter import * import Tkinter top = Tkinter.Tk() B1 = Tkinter.Button(top, text ="FLAT", relief=FLAT ) B2 = Tkinter.Button(top, text ="RAISED", relief=RAISED ) B3 = Tkinter.Button(top, text ="SUNKEN", relief=SUNKEN ) B4 = Tkinter.Button(top, text ="GROOVE", relief=GROOVE ) B5 = Tkinter.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
Advertisements