picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.53k stars 318 forks source link

Prevent SubMenuItem action on macOS #2593

Closed NikolaMendix closed 4 months ago

NikolaMendix commented 7 months ago

Click on SubMenuItem will close Context Menu or Main Menu. It is not expected behaviour for macOS.

Eto submenuitems

cwensley commented 7 months ago

Hey this fix looks great, but would you be able to get it set up so that when you subscribe to the Click event it would wire it up again?

NikolaMendix commented 7 months ago

Unfortunately no, but if we really need some action on submenu we can use ButtonMenuItem instead of SubMenuItem?

Submenu and buttonmenu

NikolaMendix commented 6 months ago

Hey @cwensley, any plans for this?

NikolaMendix commented 5 months ago

@cwensley, sorry for spamming. Are you ok with this change?

cwensley commented 5 months ago

Sorry, SubMenuItem will need to support the Click event as well otherwise it will break existing code. This needs to be written in a way to hook up the action when the event is wired up (in AttachEvent) so it can work both ways. The existing Click event needs to be translated into a handler event the same way as SubMenuItem.Opening has been done so this can be wired up.