从Microsoft功能区执行命令?

问题描述

| 由于此线程提供了帮助和建议,因此我使用Microsoft Ribbon Framework创建了我的第一个非Delphi Ribbon。 按照A.Bouchez在该线程中发布的指南,我设法编译了项目并看到了Microsoft Ribbon。 但是,当执行命令时,我似乎无法使功能区响应输入。 我始终使用TActionManager来管理我的事件,因此我所需要的只是将每个TAction从TActionManager链接到功能区。遵循上面链接的教程,我尝试了以下操作但无济于事:
// actNew is the name of a TAction set in the TActionManager
procedure TfrmMain.actNewExecute(Sender: TObject);
begin
  ShowMessage(\'execute new event\');
end;

procedure TfrmMain.CommandCreated(const Sender: TUIRibbon; const Command: TUICommand);
begin
  inherited;

  case Command.CommandId of
    cmdNew: // cmdNew was defined in the Ribbon Designer
    begin
      // link the ribbon commands to the TActions
      actNew.OnExecute(Command as TUICommandAction); // obviously will not work
    end;
  end;
end;
那么,如何将我的TAction分配给功能区? 谢谢。     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)