467,921 Members | 1,391 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,921 developers. It's quick & easy.

Tkinter Entry blocked by tkFileDialog

Hello

I have the following problem in Python 2.5 on Windows XP.
On Ubuntu I do not see the problem.

I have a Tkinter application as in the following example
The entry-widget is somehow blocked (i cannot type characters into it)
when I call askopenfilename before I create the widget.
Calling askopenfile again (by clicking the button) releases the block,
I can type into the entry as expected.

Could someone please try out the example and tell if you observe the
blocked entry, too?

Do you know a workaround? I want to call askopenfilename before
creating the widgets, since i use it to choose a config file which
controls the number and type of widgets I create.

Regards
Leonhard
import Tkinter
import tkFileDialog

tk = Tkinter.Tk()

tkFileDialog.askopenfilename()

Tkinter.Entry(tk).grid()
Tkinter.Button(tk, text='ask', command=tkFileDialog.askopenfilename).grid()

tk.mainloop()
Oct 2 '08 #1
  • viewed: 1148
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Irmen de Jong | last post: by
5 posts views Thread by max(01)* | last post: by
5 posts views Thread by annagel | last post: by
1 post views Thread by Michael Yanowitz | last post: by
5 posts views Thread by vagrantbrad | last post: by
5 posts views Thread by half.italian | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.