Insert(Index: Integer; Value: IRibbonPanel);
Insert(Index: Integer; Value: Prognoz.Platform.Interop.Forms.IRibbonPanel);
Index. It is a position in which it is inserted.
Value. It is a panel that should be inserted in the Index position.
The Insert method inserts the specified panel in the specified position in the collection.
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: