Custom popup gets keys on Linux but not on Windows

I am trying to create a custom button that when clicked (or tabbed to and spacebar) pops up a calendar for the user to show a date. The button’s own label is the currently set date (or today).

On Linux this works fine with the date being choosable using the mouse or the keyboard. But on Windows the keypresses are ignored: the only way to choose a date is to use the mouse.

The attached is the DateWidget button class — and it is runnable for testing.

Can anyone suggest a solution?

DateWidget.py (4.94 KB)

I’ve done a workaround by using one control on windows & another on linux but presenting the same API and almost the same behaviour.

DateWidget.py (6.05 KB)

···

On Tuesday, 26 March 2019 08:42:06 UTC, Mark wrote:

I am trying to create a custom button that when clicked (or tabbed to and spacebar) pops up a calendar for the user to show a date. The button’s own label is the currently set date (or today).

On Linux this works fine with the date being choosable using the mouse or the keyboard. But on Windows the keypresses are ignored: the only way to choose a date is to use the mouse.

The attached is the DateWidget button class — and it is runnable for testing.

Can anyone suggest a solution?