-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram_18.py
More file actions
54 lines (48 loc) · 1.55 KB
/
program_18.py
File metadata and controls
54 lines (48 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from tkinter import *
import tkinter.messagebox as tmsg
root=Tk()
root.geometry('500x500')
root.title("pycharm")
def myfunc():
print("dsf bf h ")
def help():
print('hii')
tmsg.showinfo('help','bhavya always for you') #it return ok
def rate():
print('rate us')
value=tmsg.askquestion(" was yr experience good",'how was your experience')
if value=='yes':
msg='good. rate us on appstore'
else:
msg='tell us what ur problem'
tmsg.showinfo('Experience',msg)
def divya():
ans=tmsg.askretrycancel('divya se dosti kr lo','sry divya nhi bnegi apki dost')
if ans:
print('retry krne pr bhi kuch nhi hoga')
else:
print("bhaut bdiya cancel kr diya")
mainmenu=Menu(root)
m1=Menu(mainmenu,tearoff=0)
m1.add_command(label="New project",command=myfunc)
m1.add_command(label="Save",command=myfunc)
m1.add_separator()
m1.add_command(label="Save as",command=myfunc)
m1.add_command(label="Print",command=myfunc)
root.config(menu=mainmenu)
mainmenu.add_cascade(label='File',menu=m1)
m2=Menu(mainmenu,tearoff=0)
m2.add_command(label="cut",command=myfunc)
m2.add_command(label="copy",command=myfunc)
m2.add_separator()
m2.add_command(label="paste",command=myfunc)
m2.add_command(label="find",command=myfunc)
root.config(menu=mainmenu)
mainmenu.add_cascade(label='Edit',menu=m2)
m3=Menu(mainmenu,tearoff=0)
m3.add_command(label='help',command=help)
m3.add_command(label='rate',command=rate)
m3.add_command(label='befriend divya',command=divya)
mainmenu.add_cascade(label='help',menu=m3)
root.config(menu=mainmenu)
root.mainloop()