Application menu Action event ?

Is there any way to attach a handler to the Application MenuItem Action event ?

What do you mean with the Application MenuItem Action event?

I want to detect when the Application menu is clicked. My app detects system.mousedown and the window is right under there. So when I click an option it does stuff with my app I don’t want.

I thought of detecting System.MouseDown when the menu is clicked, but when the app is active, that event does not fire. If fires for the menubar only when the app is not active.

At present I do when the mouse goes into the menu bar, but if the user does not click, I inhibit my app clicks for nothing. It is timed, but yet, that can be a problem.

[quote=277520:@jean-paul devulder]possible, subclass menuitem

look subclass example here: [/quote]

Thank you Jean-Paul :slight_smile:

I see. That would need declares into NSEvent. Quite complicated.

But what do you want to achieve? All menu items of the Application menu can have a Xojo menu handler – can’t you use these (plus EnableMenuItems)?

OK. I will have to make due with what I have at the moment. Thanks.