D.Tech Academic
Deep Singh
Pages
Core Java
Web App
Spring
Hibernate
Kotlin
Android
Python
Flutter
Spring Boot
Different Message Box in Python
Simple Form with Different Message Box Style
from tkinter import * from tkinter import messagebox #Tk object initialize here top = Tk() #given size here top.geometry("400x300") #button event code here def clicked(): messagebox.showinfo("Normal-Message","Welcome") messagebox.showwarning("Warning-Message","I warn you") messagebox.showerror("Error-Message","Dont do this") messagebox.askquestion("Confirm-Message","Are you ready ?") messagebox.askokcancel("Like My Blog","www.deepsingh44.blogspot.com") messagebox.askyesno("Confirm","Do you want to Date with someone") messagebox.askretrycancel("Retry-Message","Please try after some time") #initialize widget here id = Label(top, text = "ID").place(x = 20,y = 50) name = Label(top, text = "Name").place(x = 20, y = 90) blog = Label(top, text = "Blog").place(x = 20, y = 130) password = Label(top,text = "Password").place(x = 20, y = 170) button=Button(top,text="Submit",command = clicked).place(x=50,y=210) e1 = Entry(top).place(x = 80, y = 50) e2 = Entry(top).place(x = 80, y = 90) e3 = Entry(top).place(x = 80, y = 130) e4= Entry(top,show="*").place(x = 80, y = 170) #event on button here top.mainloop()
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment