Phoenix
Phoenix copied to clipboard
MenuBar blocks SpinCtrl copy/cut/paste/delete commands
Operating system: Windows 10 wxPython version & source: 4.1.1 from pypi Python version & source: Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Description of the problem: I have a menubar that catches ctrl+c, ctrl+x, ctrl+v and delete. I also have a SpinCtrl widget and a TextCtrl widget. copy, cut, paste and delete all work as expected in the TextCtrl widget but in the SpinCtrl widget they do not work and the menu events are called.
I would expect that the TextCtrl behaviour would be the intended behaviour for both widgets.
More details and code can be found on the forum post below. https://discuss.wxpython.org/t/menubar-spinctrl-and-copy/35968
We have been trying to find a workaround (as documented in the forum post) but have not had any luck beyond copy due to a quirk in the way wx.UIActionSimulator().KeyDown(wx.WXK_CONTROL_C)
behaves.
This issue has been mentioned on Discuss wxPython. There might be relevant details there:
https://discuss.wxpython.org/t/menubar-spinctrl-and-copy/35968/10
The "broken" behaviour might also extend to some other widgets.
I have tried this with wxWidgets and can see it there as well. I will have a look whether I can find the cause.
The fix is implemented in wxWidgets and will be part of wxWidgets 3.1.7.