About Menu Location Best Practice?

This is minor, but I’m wondering what others are doing with this. To be consistent with Mac Apps, the About menu is usually under the Menu for the App Name while Windows and Linux would be under the Help Menu. Since XoJo seems to put it wherever you design the menu, About will not be in the normal place on all systems.

I’m thinking it could be assigned correctly programmatically vs. having to tweak it to insure it’s correct for each app.

I know about #TargetMacos, #TargetWindows and #TargetLinux. Is this the correct what to address this or is there some feature in XoJo I’ve yet to discover?

What’s the typical way to handle this?

This may help: ApplicationMenuItem

2 Likes

Design the Menu as it would be for Windows
-Placing the About under the Help Menu
-Placing the Preferences under the Edit Menu

Then make sure that the About item’s super is set to ApplicationMenuItem
And the Preferences item’s super is set to PrefsMenuItem

3 Likes

I know this is how to get it under the Application Menu, but the question is what is the best way to have the project compile for Mac, Windows and Linux and have the About menu show in the correct place?.

Perfect!

This is what I was hoping for. Works Great! Thanks. :slight_smile:

If you follow the instructions in the docs, as explained by Jeremie, it will compile and work as you expect on each platform.

1 Like

Thanks, I did that and it works great!

Maybe when you have a moment Steve, you could mark Jeremie’s or Alberto’s replies as the “Solution”.

That’ll help others when they are searching for the same thing in the future.

Thanks.

1 Like

Since the beginning of AppleMenuItem being part of the language (20 years?), there’s still another issue I’ve never addressed and don’t know what’s best practice: I almost never have a “Help” menu.
I don’t feel it right to add the “Help” menu just for a single “About” item (and I would have to hide it on the Mac) so I usually put it “where I feel it can reasonably be”.

If my memory is correct, when you add a Hellp menu, on the Mac, it adds OS stuff.

About is set in ApplicationMenu. (macOS)

Adding an AppleMenuItem set the Menu in the Applications Menu… (macOS)

The Help menu is still useful on the Mac to have a search bar to search a menu item.
If you don’t want it to be empty you could add a link to your website.

3 Likes

Thanks. As I never use them, I didn’t even know you could search for menu items.
… and I don’t have a valid website as of now :wink:

With API 2 now use DesktopApplicationMenuItem instead of ApplicationMenuItem