【发布时间】:2018-07-24 05:27:44
【问题描述】:
目的:点击加号按钮,输入框出现加号 我这里有一个非常简单的代码:
basic=tk.Tk()
basic_label=tk.Label('Welcome to Basic Math section. \n \n Note: Please enter white spaces between objects, \n e.g. 5 + 6 \n NOT 5+6')
entry=tk.Entry()
userInput=str(entry.get())
input1, op, input2=UserInput.split(' ')
#casting inputs
input1=int(input1)
input2=int(input2)
plus=tk.Button(text='+', command=??)
我在命令中输入了什么?
【问题讨论】:
-
你做过研究吗?将文本插入条目小部件的方法有据可查。
-
这些人是不是来自同一个班级,所以最近有这么多与计算器/数学相关的应用程序哈哈,看看这个链接老兄:effbot.org/tkinterbook/entry.htm
标签: python user-interface tkinter