📜  tkinter 入口焦点 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:54.587000             🧑  作者: Mango

代码示例2
from Tkinter import *
root = Tk()
frame=Frame(root,width=100,heigh=100,bd=11)
frame.pack()
label = Label(frame,text="Enter a digit that you guessed:").pack()
entry= Entry(frame,bd=4)
entry.pack()
entry.focus()
button1=Button(root,width=4,height=1,text='ok')
button1.pack()

root.mainloop()