Table of Contents
Labels and Buttons with Relief Styles in tkinter in Python programming
Labels and Buttons with Relief Styles in tkinter in Python programming​.
tkinter Labels and Buttons with Relief Styles in Python programming
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | from tkinter import * root =Tk() p=Label(root, text="Labels and Buttons with Relief Styles") p.grid(row=0,column=0) p1=Label(root, text="RAISED", fg="white", bg="red", height=2, width=20) b1=Button(root,relief=RAISED, height=2, width=20) p1.grid(row=1,column=0) b1.grid(row=1,column=1) p1=Label(root, text="SUNKEN", fg="white", bg="orange", height=2, width=20) b1=Button(root,relief=SUNKEN, height=2, width=20) p1.grid(row=2,column=0) b1.grid(row=2,column=1) p1=Label(root, text="FLAT", fg="white", bg="blue", height=2, width=20) b1=Button(root,relief=FLAT, height=2, width=20) p1.grid(row=3,column=0) b1.grid(row=3,column=1) p1=Label(root, text="RIDGE", fg="white", bg="green", height=2, width=20) b1=Button(root,relief=RIDGE, height=2, width=20) p1.grid(row=4,column=0) b1.grid(row=4,column=1) p1=Label(root, text="SOLID", fg="white", bg="magenta", height=2, width=20) b1=Button(root,relief=SOLID, height=2, width=20) p1.grid(row=5,column=0) b1.grid(row=5,column=1) p1=Label(root, text="GROOVE", fg="white", bg="purple", height=2, width=20) b1=Button(root,relief=GROOVE, height=2, width=20) p1.grid(row=6,column=0) b1.grid(row=6,column=1) |
Output

We are aiming to explain all concepts of python in easiest terms as possible.

ITVoyagers
Author
PRACTICALS/PRACTICE PROGRAM IN PYTHON
CHECKOUT OTHER RELATED TOPICS
CHECKOUT OTHER QUIZZES
Quizzes on File Handling |
Easy quiz on file handling in python part 1 |
Easy quiz on file handling in python part 2 |
Quizzes on Exception Handling |
Easy quiz on Exception Handling in python part 1 |
Easy Quiz on Exception Handling in python part 2 |
Quizzes on Regular Expressions |
Easy Quiz on Regular Expression in python part 1 |
Quizzes on Python concepts coming soon… |
Python basic quiz |
New and easy python quiz basic part 1 |
New and easy python quiz (basic) part 2 |
New and easy python quiz (basic) part 3 |
Python practice quiz set |
Best Practice Quiz Set on Python Programming Part 1​ |
Best Practice Quiz Set on Python Programming Part 2 |
Best Practice Quiz Set on Python Programming Part 3​ |
Best Practice Quiz Set on Python Programming Part 4 |
Best Practice Quiz Set on Python Programming Part 5 |