TMainMenu – managing Help and Search menu items


Running my Firemonkey app in OSX, a Search box automatically appears on my last menu item, which I have labeled “Help.” So far so good, because a Help menu with a Search box is standard for OSX.

Next, I needed to add a help file. I purchased an impressive utility Help Crafter with which I very quickly and easily made an Apple HelpBook. I placed the HelpBook bundle into the Resources folder of my main app. I then used Project|Options|Version Info in the IDE to edit the Info.plist file. I added two keys CFBundleHelpBookFolder and CFBundleHelpBookName to Info.plist to point to my HelpBook.

Running my app, I now found I had two Help menu items — the item I had programmed and another apparently automatically created by the Mac OS, complete with a submenu item that brings up my HelpBook. To my amazement, I now had working help without any coding whatsoever.

Next, I wanted to remove the Help menu item I had created in order to eliminate the duplication. But the Search box was still located under my Help menu item, not on the Help menu item created by the OS. And when I deleted my Help menu item, the Search box relocated to what was now the last menu item created by me.

How can I specify that the Search box should be located on the OS-created
Help menu item?
Alternatively, can I specify that the OS should not automatically
create a Help menu item (so that I can create it myself)? In that
case, I should also need to know how to program the loading of the
If I stick with the OS-created Help menu item, how can I add
additional submenu items to it?

It appears from Apple documentation that the Help and Search functions are provided by the OS when a HelpBook has been registered. But the two functions are supposed to be on the same menu item. I am wondering if this may be a Firemonkey bug that they are being split up.

Comments are closed.