The first menu item Delphi FMX TMainMenu is not displayed in OSX, OK in WIndows

I created a Multi-Device app in Delphi Seattle and added TMainMenu with MenuItem1 and MenuItem2 (nothing more). When creating and starting OSX, only MenuItem2 is displayed. When creating and starting Windows, both menu items are displayed. I did not consider two menu items differently. Both were added and not configured in any way. Does anyone else experience this?

+4
source share
1 answer

The top-level items on the Mac menu bar usually look like this:

Apple/system menu ('About this Mac', 'System Preferences...', etc.)
Application menu ('About XXX', 'Services', 'Hide XXX', 'Hide Others',
  'Show All', 'Quit XXX')
File menu
Edit Menu
...

FMX ( ) TMainMenu . , ( - ), OS X; Mac. , (TFileHideApp, TFileHideAppOthers, TFileExit). , :

  • , TActionList
  • , .
  • ...
  • TFileHideApp, TFileHideAppOthers TFileExit OK
  • , , TMainMenu
  • , ; , () mnuApp
  • mnuApp; Object Inspector, Action FileHideApp1, - FileHideAppOthers, - FileExit1; (-),
  • , OnCreate , Object Inspector
  • , mnuApp, OS X. , File | Exit, OS X, :

...

procedure TForm1.FormCreate(Sender: TObject);
begin
  mnuApp.Visible := (TOSVersion.Platform = pfMacOS);
  itmExit.Visible := (TOSVersion.Platform <> pfMacOS);
end;
+6

Source: https://habr.com/ru/post/1613989/


All Articles