Difference between revisions of "Mac Preferences and About Menu"
Cringer000 (talk | contribs) (Information about the placing the Preferences and About Menu on a Mac Application.) |
Cringer000 (talk | contribs) (Changed sentence part that reads "Lazarus currently provide direct access" to "Lazarus doesn't currently provide direct access" to make it more correct.) |
||
Line 1: | Line 1: | ||
These items should appear on the default menu that is titled with an applications' name. | These items should appear on the default menu that is titled with an applications' name. | ||
− | The problem is that Lazarus doesn't provide direct access to this auto-generated | + | The problem is that Lazarus doesn't currently provide direct access to this auto-generated |
menu, nor does it add these two items to it automatically. To get them on the | menu, nor does it add these two items to it automatically. To get them on the | ||
same menu as Quit, you have to perform a little trick. | same menu as Quit, you have to perform a little trick. |
Revision as of 09:21, 7 July 2012
These items should appear on the default menu that is titled with an applications' name. The problem is that Lazarus doesn't currently provide direct access to this auto-generated menu, nor does it add these two items to it automatically. To get them on the same menu as Quit, you have to perform a little trick.
Create a menu item and name it your apps name, just for reference.
Then, under that menu add the following:
Assign the "Preferences..." Menu Item Shortcut "Command ," using the "Grab key" button.
After you've pressed the "Command ," using "Grab key", this is how your shortcut will appear:
Then, to get these items on the MyApp menu, we must name the first menu item as follows:
procedure TForm1.FormCreate(Sender: TObject); begin MenuItem1.Caption := #$EF#$A3#$BF; //Unicode Apple logo char end;
Once your program is compiled and ran, you will notice that "About MyApp" and "Preferences..." have been added to the MyApp menu, which is where they should be.