Display Message On Form - The Advantages of Learning Python Programming for Beginners: A Comprehensive Guide

Latest

Dive into the world of Python programming with our comprehensive resources

Music

logo

Sunday, May 7, 2023

Display Message On Form

 

In this article, we will show a message on the form.

 


 

 

 

 

 

 

 

 

 

 

 

import tkinter as tk

from tkinter import *

 

root = Tk()

root.title('message..bs')

root.geometry('350x310')

 

str = "Life is like riding a bicycle,\n To keep your balance,\n You must keep moving.\n                ***          \n Weak people revenge,\n Strong people forgive, \n Intelligent people ignore. \n \n -Albert Einstein"

 

message = tk.Message(root, text = str)

message.config(bg='deepskyblue',fg='white', font=('arial', 22, 'italic'))

message.pack()

 

root.mainloop()

 

Hope to see you in the next article. Happy coding.

No comments:

Post a Comment

Featured post

Python Introduction

What is Python? Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built ...