[Tkinter-discuss] Focus for first key press

Michael Lange klappnase at web.de
Wed Jun 20 18:33:58 CEST 2012


Hi Mark,

Thus spoketh Mark Summerfield <list at qtrac.plus.com> 
unto us on Wed, 20 Jun 2012 09:55:00 +0100:

> Hi,
> 
> I have a couple of Tkinter applications and what I've noticed is that if
> I do Alt+F as soon as they start (i.e., for Alt+F,N for New or Alt+F,O
> for Open), the keypress is ignored! It works fine the second and all
> subsequent times.
> 
> I've tried calling focus() on the invisible root window & on the topmost
> visible window, but neither has any effect.
> 
> Can anyone tell me a solution?

I am not sure what you are actually trying to do, could you please post a
simple example that shows the problem?

Regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

The people of Gideon have always believed that life is sacred.  That
the love of life is the greatest gift ... We are incapable of
destroying or interfering with the creation of that which we love so
deeply -- life in every form from fetus to developed being.
		-- Hodin of Gideon, "The Mark of Gideon", stardate 5423.4


More information about the Tkinter-discuss mailing list