[Tkinter-discuss] Focus for first key press

Mark Summerfield list at qtrac.plus.com
Wed Jun 20 10:55:00 CEST 2012


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?

Thanks!

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Programming in Python 3" - ISBN 0321680561
            http://www.qtrac.eu/py3book.html


More information about the Tkinter-discuss mailing list