Tkinter: focus/text selection problem with tkFileDialog
Irmen de Jong
irmen at -nospam-remove-this-xs4all.nl
Fri Apr 30 15:51:40 CEST 2004
I'm having trouble with the code below.
It's just a regular Tk text widget in which you can type and
select text as expected, however the call to tkFileDialog.askopenfilename()
seems to screw things up. After the file dialog, I can no longer use
the Text widget (typing, selecting, it doesn't work anymore!)
What am I doing wrong?
--Irmen de Jong
import Tkinter, tkFileDialog
txt.insert(Tkinter.END,"Choose a file, then try to select me")
txt.insert(Tkinter.END,"\nFile chosen: "+name)
More information about the Python-list