Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6025047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:14:42+00:00 2026-05-23T04:14:42+00:00

I have created my first non Delphi Ribbon using the Microsoft Ribbon Framework thanks

  • 0

I have created my first non Delphi Ribbon using the Microsoft Ribbon Framework thanks to the help and advice provided in this thread.

Following the guide that A.Bouchez posted in that thread I have managed to compile my project and see the Microsoft Ribbon in action.

However, I cannot seem to get the Ribbon to respond to input when a Command is executed.

I always use the TActionManager to manage my Events, so all I need is to link each TAction from the TActionManager into the Ribbon. Following the tutorial linked above, I tried the following to no avail:

// 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;

So, how do I assign my TActions to the Ribbon?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:14:43+00:00Added an answer on May 23, 2026 at 4:14 am

    I found out how to execute the commands from viewing the samples provided (dont know how I missed them!). The events seem to have to be defined independent of TActions, so I guess that is the way to go.

    It is possible though linking the Actions OnExecute handler inside the procedure that is used for calling commands for the Ribbon, example:

    private
      CommandNew: TUICommandAction;
      procedure CommandNewExecute(const Args: TUICommandActionEventArgs);
    
      procedure UpdateRibbonControls;
    strict protected
      procedure RibbonLoaded; override;
      procedure CommandCreated(const Sender: TUIRibbon; const Command: TUICommand); override;
    
    implementation
    
    procedure TfrmMain.RibbonLoaded;
    begin
      inherited;
    
      Color:= ColorAdjustLuma(Ribbon.BackgroundColor, -25, False);
      UpdateRibbonControls;
    end;
    
    // set command states here
    procedure TfrmMain.UpdateRibbonControls;
    begin
      if Assigned(CommandNew) then
        CommandNew.Enabled:= True;
    end;
    
    // assign the commands
    procedure TfrmMain.CommandCreated(const Sender: TUIRibbon; const Command: TUICommand);
    begin
      inherited;
    
      case Command.CommandId of
        cmdNew: // command id defined in the ribbon designer
        begin
          CommandNew:= Command as TUICommandAction;
          CommandNew.OnExecute:= NewExecute;
        end;
      end;
    end;
    
    // command events
    procedure TfrmMain.NewExecute(const Args: TUICommandActionEventArgs);
    begin
      actNew.OnExecute(nil); // < this is calling the event code from a TAction      
    end;
    

    The Samples folder inside the Ribbon Framework will demonstrate this more clearer. The Framework can be found here: http://www.bilsen.com/windowsribbon/index.shtml

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder with these files: alongfilename1.txt <--- created first alongfilename3.txt <--- created
I have a big project that was first created in Borland C++ 6. We're
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a C# class file by using a XSD-file as an input.
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process
Im using c# .net windows form application. I have created a database which has
I'm using SQL*Plus 9.2 on Oracle 10g enterprise. I have created some scripts that
Have created a c++ implementation of the Hough transform for detecting lines in images.
I have created a template for Visual Studio 2008 and it currently shows up
I have created a PHP-script to update a web server that is live inside

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.