赞
踩
import tkinter as tk #GUI库 def go(): print(entry1.get()) # 获取文本框的内容打印 #创建窗口 win = tk.Tk() #初始化 #创建单行可输入文本框 entry1 = tk.Entry(win, width=50) # entry1=tkinter.Entry(win,show="*",width=50,bg="red",fg="black") #创建Button按键 frequency = tk.Button(win, text='确认',command=go) # 输入次数信息的Entry控件 frequency.pack() entry1.pack() win.mainloop()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。