Insert(Index: Integer; Value: IRibbonCategory);
Insert(Index: Integer; Value: Prognoz.Platform.Interop.Forms.RibbonCategory);
Index. It is a position in which it is inserted.
Value. It is a tab that should be inserted in the Index position.
The Insert method inserts the specified tab 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 tab, he should remove it from the collection.
Executing the example requires a form, a button named Button1 positioned on it and the Ribbon component named Ribbon1. Several tabs are created on the ribbon.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
RCategories: IRibbonCategories;
RCategory: IRibbonCategory;
Begin
RCategories := Ribbon1.Categories;
RCategory := RCategories.Item(0);
RCategories.Remove(RCategory);
RCategories.Insert(RCategories.Count, RCategory);
End Sub Button1OnClick;
On clicking the button the first tab is moved to the end of the ribbon.
See also: