The delete key
Posted: Sat Dec 17, 2005 6:22 am
Hi,
Does anybody have any suggestions for how to get multiple event handlers to fire on a key press?
I have the Delete key bound to a menu item command (ie Edit->Delete) using a nice handy "\tDel" appended to the menu item, which when pressed deletes selected items on the main canvas of my program. This key enables/disables depending on whether there are objects selected (achieved using EVT_UPDATE_UI events).
The problem is I have a console (a wxTextCtrl) and various other components on the screen too and having this key bound to a menu item blocks the keystroke from reaching the other controls.
Any ideas how I can get the key press passed to the other controls as usual? If it fires the menu item at the same time this will be ok as I have a FindFocus call in there that compares the window handles to make it not trigger when the focus is one of the other controls.
Thanks,
Ian
Does anybody have any suggestions for how to get multiple event handlers to fire on a key press?
I have the Delete key bound to a menu item command (ie Edit->Delete) using a nice handy "\tDel" appended to the menu item, which when pressed deletes selected items on the main canvas of my program. This key enables/disables depending on whether there are objects selected (achieved using EVT_UPDATE_UI events).
The problem is I have a console (a wxTextCtrl) and various other components on the screen too and having this key bound to a menu item blocks the keystroke from reaching the other controls.
Any ideas how I can get the key press passed to the other controls as usual? If it fires the menu item at the same time this will be ok as I have a FindFocus call in there that compares the window handles to make it not trigger when the focus is one of the other controls.
Thanks,
Ian