IRibbonPanels.Insert

Syntax

Insert(Index: Integer; Value: IRibbonPanel);

Parameters

Index. Position, to which it is inserted.

Value. Panel that must be inserted to the Index position.

Description

The Insert method inserts the specified panel to the specified position in the collection.

Comments

If the tab is created dynamically, it must be added to the ribbon after creation. It must be included to the collection using the Add or Insert method. The parameters of the tab can be changed. If the user wants to move the panel, he must remove it from the collection.

Var
    RCategory1, RCategory2: IRibbonCategory;
    RPanels1, RPanels2: IRibbonPanels;
    RPanel: IRibbonPanel;
Begin
    RCategory1 := Ribbon1.Categories.Item(0);
    RCategory2 := Ribbon1.Categories.Item(1);
    RPanels1 := RCategory1.Panels;
    RPanels2 := RCategory2.Panels;
    RPanel := RPanels1.Item(0);
    RPanels1.Remove(RPanel);
    RPanels2.Insert(RPanels2.Count, RPanel);

See also:

IRibbonPanels