2

我想知道,如何添加或删除 actionMenuBar 组件的 windowMenu 选项,我有一个 mdi 应用程序我可以添加该选项但后来我无法删除它

对不起我的英语

我有这个:

   //add windowmenu and works fine       
   procedure TForm2.Button1Click(Sender: TObject);
   begin
    Form1.ActionMainMenuBar1.WindowMenu := '&Ventana';
   end;

   //remove windowmenu but dont work
   procedure TForm2.Button2Click(Sender: TObject);
   begin
    Form1.ActionMainMenuBar1.WindowMenu := '';
   end;
4

1 回答 1

3
type
  ActionMainMenuBarAccess = class(TActionMainMenuBar);

procedure TForm2.Button2Click(Sender: TObject);
begin
  ActionMainMenuBar1.WindowMenu := '';
  ActionMainMenuBarAccess(ActionMainMenuBar1).FWindowMenuItem := nil;
  ActionMainMenuBarAccess(ActionMainMenuBar1).RefreshMDIMenu;
end;

另请参阅此QualityCentral 报告

于 2012-11-08T18:36:22.950 回答