Notepad software with Python

 from tkinter import*

import tkinter.messagebox as tmsg
root=Tk()
root.geometry("700x500")
root.title("My Notepad")
def myfunc():
    print("I am visual studio code")
def help():
    tmsg.showinfo("Help""www.elalita.com")
def rate():
    # print("Rate Us")
    value=tmsg.askquestion("Was your experiance good")
    print(value)
    if value=="yes":
        msg="Great Please rate us on www.elalita.com"
    else:
        msg="thansk for suggation, we resolve the problem"
    tmsg.showinfo("Experiance", msg)
    

yourmenubar=Menu(root)
m1=Menu(yourmenubar)
m1.add_command(label="New Project"command=myfunc)
m1.add_command(label="Save"command=myfunc)
m1.add_command(label="Save As"command=myfunc)
m1.add_separator()
m1.add_command(label="Print"command=myfunc)
m1.add_command(label="Exit"command=quit)
root.config(menu=yourmenubar)
yourmenubar.add_cascade(label="FIle"menu=m1)   

m2=Menu(yourmenubar)
m2.add_command(label="Text Size"command=myfunc)
m2.add_command(label="Text Color"command=myfunc)
m2.add_command(label="Font"command=myfunc)
root.config(menu=yourmenubar)
yourmenubar.add_cascade(label="Edit"menu=m2)


m3=Menu(yourmenubar)
m3.add_command(label="Go to Website"command=help)
m3.add_command(label="Rate us"command=rate)
root.config(menu=yourmenubar)
yourmenubar.add_cascade(label="Help"menu=m3)

root.mainloop()    

Comments

Popular posts from this blog

Prime Number

star pattern

Basic Calc using Python Tkinter