IRibbonPaletteButtonGroups.Add

Syntax

Add(Value: IRibbonPaletteButtonGroup);

Parameters

Value. A group of graphic buttons, which must be added to the collection.

Description

The Add method adds the specified group of graphic buttons to the collection.

Comments

To create a new group of graphic buttons, initialize object of the RibbonPaletteButtonGroup class, set up its properties and add it to the collection using the Add method.

Example

Executing the example requires a form, a button named Button1 on the form, the Ribbon component named Ribbon1, and the ImageList component named PaletteImg. A tab and a panel are created on the ribbon of the Ribbon1 component. Several images are loaded to the PaletteImg component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    RPanel: IRibbonPanel;
    PlButton: IRibbonPaletteButton;
    PlGroup: IRibbonPaletteButtonGroup;
Begin
    RPanel := Ribbon1.ActiveCategory.Panels.Item(0);
    PlButton := New RibbonPaletteButton.Create;
    RPanel.Elements.Add(PlButton);
    PlButton.Text := "Create";
    PlGroup := New RibbonPaletteButtonGroup.Create;
    PlGroup.Images := PaletteImg;
    PlGroup.Name := "Additional objects";
    PlButton.Groups.Add(PlGroup);
End Sub Button1OnClick;

On clicking the button a button that opens a combobox is created on the ribbon panel. The menu will contain a group of graphic buttons, which images will be loaded from the PaletteImg component.

See also:

IRibbonPaletteButtonGroups