Hi,

On Thu, 1 Feb 2018 23:52:34 -0600
alan moore <m...@alandmoore.com> wrote:

> Thanks.  I managed to work it out.  I think the problem was twofold:
> 
> - I needed to call self.mywidget.focus_force(), because my test root 
> wasn't getting focus
> - I needed to call self.root.update() before *and* after the key events
> 
> This got it working.

Here (debian linux) the test also works if I just change the setUp()
method like this:

    def setUp(self):
        super().setUp()
        self.mywidget = self.create()
        self.mywidget.wait_visibility()
        self.mywidget.update_idletasks()
        self.mywidget.focus_set()

Regards

Michael


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

Is not that the nature of men and women -- that the pleasure is in the
learning of each other?
                -- Natira, the High Priestess of Yonada, "For the World is
                   Hollow and I Have Touched the Sky", stardate 5476.3.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to