标签:llb cal loop pre command ext nbsp tkinter print
1 #按钮弹出菜单 2 from tkinter import * 3 root =Tk() 4 5 def callback(): 6 print(‘我被调用了‘) 7 8 9 m = Menubutton(root,text = ‘点我‘,width=3,height=3) 10 m.pack() 11 12 filemenu = Menu(m) 13 filemenu.add_command(label=‘剪切‘,command=callback) 14 filemenu.add_command(label=‘复制‘,command=callback) 15 16 m.config(menu=filemenu) 17 18 19 mainloop()
标签:llb cal loop pre command ext nbsp tkinter print
原文地址:http://www.cnblogs.com/themost/p/6780720.html