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

  • SEARCH
  • Home
  • 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 367875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:46:12+00:00 2026-05-12T13:46:12+00:00

I can easly add a MRF list to A TRibbon recent items list but

  • 0

I can easly add a MRF list to A TRibbon recent items list but how do you add
the same list to a ribbon item set as a dropdownbutton? The dropdown
item is ActionBars[2].Items[1].

var
ARecentFilesList: TStringList;
ACI: TActionClientItem;
if FileExists( ARecentFilesFilename ) then
begin
  ARecentFilesList.LoadFromFile( ARecentFilesFilename );
  for i := 0 to ARecentFilesList.Count - 1 do
  begin
    // add filename to Ribbon Recent Items
    Ribbon1.AddRecentItem( ARecentFilesList.Strings[ i ] );
    //add the file name to dropdown button collection
    //add MostRecentFiles to ActionBars[2].Items[1]
    //ACI := TActionClientItem.Create( );
    //ACI.Caption := ARecentFilesList.Strings[ i ];
  end;
end;

Thanks,

Bill

  • 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-12T13:46:13+00:00Added an answer on May 12, 2026 at 1:46 pm

    As with much of the actionbar controls, it is not as intuitive as you’d like. The basic structure on the ribbon is like this:

    • Each ribbon has tabs.
    • Each tab has groups.
    • Each group has a series of controls.
    • Each control has a TActionClient associated with it.
    • Each TActionClient can have other TActionClient objects associated with it, either as ContextItems or Items. And the more you repeat this level, the deeper the nested menus.

    So your strategy then, is to get your hands on the TActionClient that represents the button you’d like to add your items to. On my simple test app, I grabbed the first control on the first group – your logic may need to be more advanced.

    var
      ActionClient: TActionClient;
      ChildItem: TActionClientItem;
    begin
    // Does the same as Ribbon1.AddRecentItem('C:\MyFile.txt');
    
      ActionClient := RibbonGroup1.ActionControls[0].ActionClient;
    
      ChildItem := ActionClient.Items.Add;
      ChildItem.Action := ActionThanOpensAFile;
      ChildItem.Caption := 'C:\MyFile.txt';
    end;
    

    Note that I assign the caption of my menu item after I assigned the action – this is because the action replaces the caption (and other properties too) of the client it is associated with.

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

Sidebar

Related Questions

I understand that if one has a listBox one can easily add items to
In asp.net mvc, you can easily call/add a controller from a view, but what
I can easily check IP addresses programmatically, but is there any way to set
I know you can easily add custom meta boxes per post type, but I'm
In CSharp it's as simple as writing: listBox1.Items.Add("Hello"); listBox1.Items.Add("There"); foreach (string item in listBox1.Items
I can easily add a fill on the element ( <path fill=#FF0000> ), but
I can easily add webparts to my custom master page, but they appear static
With extension methods we can easily add methods to any type. Obviously this opens
Can we add webservice(.asmx) to window application.When i go through File->New Project-> i cant
Is there a data type like vector or queue where you can easily add

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.