Ads Here

Saturday, 5 December 2020

ringing bell - tkinter - Python


code:

 from tkinter import *

root = Tk()
root.title("System Bell")
root.geometry("500x500")

bell = PhotoImage(file="your path")
bell_label = Label(root, image=bell)
bell_label.pack(pady=20)

def ring():
    root.bell()


buuton = Button(root ,
    text="Ring The Bel", command=ring,
    font=("font name", size),
    fg="#color in hexa decimal")

buuton.pack(pady=20)

root.mainloop()

email  = sarvesh9443382135@gmail.com

No comments:

Post a Comment