Ticket CQ61663
Visible to All Users

Adding BarButton and Separators at runtime

created 18 years ago

I have an TdxBarSubItem on my RibbonBar and will fill the submenu list at runtime. I ́m scanning files in a specific path and will then create a TdxBarButton for each fileIi found, and a BarSeperator for the different FileGroups. So it should look like that:
FileGroup (BarSeperator)
File
File
File
FileGroup

I will also destroy these components at runtime.
Can you please help?
Best regards
Michael Reisch

Show previous comments (2)
DevExpress Support Team 18 years ago

    Hi Michael,
    Please use the following code to clear the required ItemLinks collection and delete the corresponding bar items:
    procedure TForm1.ClearItemLinks(AItemLinks: TdxBarItemLinks);
    var
      I: Integer;
    begin
      AItemLinks.BarManager.LockUpdate := True;
      try
        for I := AItemLinks.Count -1 downto 0 do
          AItemLinks[I].Item.Free;
        AItemLinks.Clear;
      finally
        AItemLinks.BarManager.LockUpdate := False;
      end;
    end;
    Please let us know your results.
    Thanks,
    Vito

    G G
    gripsware datentechnik gmbh 18 years ago

      Hi Vito,
      it works perfect. Thank you
      Michael

      DevExpress Support Team 18 years ago

        Hi Michael,
        You are welcome!
        Thanks,
        Vito

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.