Difference between revisions of "Mac Preferences and About Menu"
Jwdietrich (talk | contribs) |
Jwdietrich (talk | contribs) |
||
Line 3: | Line 3: | ||
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. | ||
− | |||
Create a menu item and name it your apps name, just for reference. | Create a menu item and name it your apps name, just for reference. | ||
Line 33: | Line 32: | ||
[[File:MenuItems4.jpg]] | [[File:MenuItems4.jpg]] | ||
+ | |||
+ | == See also == | ||
+ | *[[Introduction to platform-sensitive development]] | ||
[[Category:Mac OS X]] | [[Category:Mac OS X]] | ||
[[Category:Platform-sensitive development]] | [[Category:Platform-sensitive development]] |
Revision as of 00:37, 20 May 2013
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.