IRibbonPanels.Insert

Fore Syntax

Insert(Index: Integer; Value: IRibbonPanel);

Fore.NET Syntax

Insert(Index: Integer; Value: Prognoz.Platform.Interop.Forms.IRibbonPanel);

Parameters

Index. It is a position in which it is inserted.

Value. It is a panel that should be inserted in the Index position.

Description

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

Comments

If the tab is created dynamically, it should be added to the ribbon after creation. It should be included in the collection using Add or Insert method. The parameters of the tab can be changed. If the user wants to move the panel, he should 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