[Tkinter-discuss] Binding custom events from a Menu on Windows

2021-05-02 Thread alan moore
not work at all on Windows.  The callback are never executed.  I suspect this has to do with the way menus are implemented on Windows; I know I can generate/bind events on the root window as a workaround, but should this work as-is? ( PS -- I posted this to stackoverflow, if anyone is interested

Re: [Tkinter-discuss] Simulating keystrokes in a tkinter unit test

2018-02-01 Thread alan moore
they have focus, and will ignore keyboard events if they aren't focused. At least, I vaguely recall having done that a decade or two ago when I tried writing a tcl/tk testing harness. On Wed, Jan 31, 2018 at 12:09 PM, alan moore <mailto:m...@alandmoore.com>> wrote: Hi all,

[Tkinter-discuss] Simulating keystrokes in a tkinter unit test

2018-02-01 Thread alan moore
Hi all, I'm attempting to write a unit test for a custom widget using Python unittest.  I'm trying to simulate actual keystrokes in my unit test. Following the example from the tkinter test suite, I created a test that is approximately this: from tkinter import Entry as MyWidget from tkinte