[Tutor] tkSimpleDialog

D. Rick Anderson ruger@comnett.net
Fri, 02 Aug 2002 10:43:27 -0700


Hi ppl. I'm new to this list and I'm trying to get the hang of Tkinter. 
I was determined to figure this one out on my own, but I just can't get 
it to work. Given the following code:

from Tkinter import *
import tkSimpleDialog

root = Tk()
textstring = tkSimpleDialog.askstring('Text', 'Please enter some text', 
parent=root)
root.mainloop()

how do I force the keyboard focus to the entry on the dialog box? I've 
tried all kinds of .focus() variations, but apparently askstring doesn't 
have a focus / focus_set / focus_force function?

TIA

Rick