File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # View more python learning tutorial on my Youtube and Youku channel!!!
2
+
3
+ # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
4
+ # Youku video tutorial: http://i.youku.com/pythontutorial
5
+
6
+ import tkinter as tk
7
+
8
+ window = tk .Tk ()
9
+ window .title ('my window' )
10
+ window .geometry ('200x200' )
11
+
12
+ def hit_me ():
13
+ #tk.messagebox.showinfo(title='Hi', message='hahahaha')
14
+ #tk.messagebox.showwarning(title='Hi', message='nononono')
15
+ #tk.messagebox.showerror(title='Hi', message='No!! never')
16
+ #print(tk.messagebox.askquestion(title='Hi', message='hahahaha')) # return 'yes' , 'no'
17
+ #print(tk.messagebox.askyesno(title='Hi', message='hahahaha')) # return True, False
18
+ print (tk .messagebox .asktrycancel (title = 'Hi' , message = 'hahahaha' )) # return True, False
19
+ print (tk .messagebox .askokcancel (title = 'Hi' , message = 'hahahaha' )) # return True, False
20
+
21
+ tk .Button (window , text = 'hit me' , command = hit_me ).pack ()
22
+ window .mainloop ()
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
You can’t perform that action at this time.
0 commit comments