Skip to content

Commit 44bf664

Browse files
authored
Merge pull request MorvanZhou#57 from JNingWei/master
Fix a bug "AttributeError"; Add three annotations.
2 parents 782322a + 409edaa commit 44bf664

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tkinterTUT/tk11_msgbox.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
# Youku video tutorial: http://i.youku.com/pythontutorial
55

66
import tkinter as tk
7+
import tkinter.messagebox
78

89
window = tk.Tk()
910
window.title('my window')
1011
window.geometry('200x200')
1112

1213
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')
14+
#tk.messagebox.showinfo(title='Hi', message='hahahaha') # return 'ok'
15+
#tk.messagebox.showwarning(title='Hi', message='nononono') # return 'ok'
16+
#tk.messagebox.showerror(title='Hi', message='No!! never') # return 'ok'
1617
#print(tk.messagebox.askquestion(title='Hi', message='hahahaha')) # return 'yes' , 'no'
1718
#print(tk.messagebox.askyesno(title='Hi', message='hahahaha')) # return True, False
1819
print(tk.messagebox.asktrycancel(title='Hi', message='hahahaha')) # return True, False

0 commit comments

Comments
 (0)