Sunday, 23 January 2022

Write Python GUI program to display an alert message when a button is pressed.

Slip 10 Q 1

CODE :

from tkinter import *
from tkinter import messagebox

def clicked():
    messagebox.showinfo('Button','Button is pressed.')
root=Tk()
root.geometry('300x200')
word= Label(root,text='messagebox from button')
Button1=Button(root,text='BUTTON',command=clicked)
word.pack()
Button1.pack()
root.mainloop()

OUTPUT:




No comments:

Post a Comment

Write a Java program to display given extension files from a specific directory on server machine.

 DOWNLOAD     SLIP14Q2 /** * STEPS TO RUN CODE * Step 01 compile the code * Step 02 run the code * Step 03 give a file directory locatio...