Add(Value: IRibbonPaletteButtonGroup);
Value. A group of graphic buttons, which must be added to the collection.
The Add method adds the specified group of graphic buttons to the collection.
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.
Executing the example requires a form with a button named Button1 on it, 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: