checkLabel = ttk.Label(win,text = " Check Amount ", foreground = "blue")
checkLabel.grid(row = 0 , column = 1)
checkEntry = ttk.Entry(win, textvariable = checkVariable)
checkEntry.grid(row = 1, column = 1, sticky = 'w')
如何更改defualt entry字段,使其不显示0?在
Tags:
在创建
Entry
对象之前,将checkVariable
的值设置为''
(空字符串)?要使用的语句是但是
checkVariable
必须是StringVar
,如果需要整数值,则必须自己将输入值转换为整数。在使用entry小部件的函数
.insert()
和.delete()
。这是一个例子。在另一种方法是使用Tkinter StrVar。下面是一个使用str变量的示例。在
^{pr2}$相关问题 更多 >
编程相关推荐