is there a way to send an event from a control to another ?

Hi folks,

I have a listbox (subclass) that has some (quite a lot) of menu handlers.
then I added a search control, that has the focus when you open the window.
I would like to redirect the menu handlers that occurs when the focus is in the search control to the listbox, in a simple way.
is there one ?

thanks.

to send it to another control ? no
they’re like events - you cant send an event from one control to another

have you tried adding a menu handler to your search field subclass so it gets a chance to handle the menu selection when it has focus ?

well in fact it seems it would be easier to handle the menuhandlers in the window itself ?

I would think so… You can check which control has the focus if the menu behavior need to change

thats possible to
at least at that point you can check what control has focus etc and call one of their methods