python tkinter focus on entry

Solutions on MaxInterview for python tkinter focus on entry by the best coders in the world

showing results for - "python tkinter focus on entry"
Clementine
10 Feb 2016
1from Tkinter import *
2root = Tk()
3frame=Frame(root,width=100,heigh=100,bd=11)
4frame.pack()
5label = Label(frame,text="Enter a digit that you guessed:").pack()
6entry= Entry(frame,bd=4)
7entry.pack()
8entry.focus()
9button1=Button(root,width=4,height=1,text='ok')
10button1.pack()
11
12root.mainloop()