Hi all,
I’m having an issue with RichTextCtrl (RTC) and the Ctrl+C, Ctrl+V, and Ctrl+X accelerators. Part of the program needs to know when the user copies, pastes, and cuts into the RTC. The user can do this from a menu, or with the keyboard accelerators. The most straightforward solution to do this is to override the RTC’s functions, within which we do all the custom stuff first, then call e.g. super().Cut(). This works fine when calling from a menu, but the accelerators bypass the override functions for some reason, which leads me to wonder if the RTC’s Copy(), Paste(), and Cut() methods are even called when the accelerators are used. Any ideas on how to catch these accelerators? I believe this was explored a bit in another post (link below) but never fully resolved.
Sample code provided to demonstrate the issue, try copy/cut/paste from the menu then with accelerators. Thanks!
Similar post: https://groups.google.com/forum/#!searchin/wxpython-users/richtextctrl%7Csort:date/wxpython-users/RRwj7TaiqHc/VouLsY_FBwAJ
sample.py (3.17 KB)