Einzelnen Beitrag anzeigen

CHackbart

Registriert seit: 22. Okt 2012
260 Beiträge
 
#3

AW: TMainMenu unter OSX

  Alt 16. Sep 2013, 09:59
Nachtrag:
Es ist wesentlich sauberer, wenn Du das hier machst:

Delphi-Quellcode:
TMainMenu = class(FMX.Menus.TMainMenu, IItemsContainer)
  protected
    procedure DoRecreateOSMenu(const Form: TCommonCustomForm); override;
  public
    procedure Activate;
  end;

{ TMainMenu }
procedure TMainMenu.Activate;
begin
  IFMXMenuService(TPlatformServices.Current.GetPlatformService(
    IFMXMenuService)).CreateOSMenu(Application.MainForm, Self);
end;

procedure TMainMenu.DoRecreateOSMenu(const Form: TCommonCustomForm);
begin
  { do nothing - Activate method now controls this }
end;
Das ist in abgewandelter Form von hier: http://delphihaven.wordpress.com/category/xe3/page/2/

Christian
  Mit Zitat antworten Zitat