-1
即时通讯做简单的GUI计算器。我有0-9的数字按钮。我将所有的数字和aritnmetic符号存储在一个名为caluclations.string的字符串中。我有一个函数,它执行以下操作:Python和tkinter(按钮)
newString = ""
newString += calculations
newString += (here is the button text(for example if button1 was clicked i will add to newString "1")
return newString
我希望当我按下一个按钮,调用函数与newString返回计算string.Any想法?
“任何想法”对于本网站来说都太广泛和偏离主题。你做过任何研究吗?在这个网站上有几十个与按钮和计算器有关的问题,并且将按钮与功能相关联的方法已有详细记录。 –