I'd like to set the focus of my program to a specific entry
widget so that I can start entering data straight-away - how can I do this?
My current code
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()
button1=Button(root,width=4,height=1,text='ok')
button1.pack()
root.mainloop()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…