Insert(Index: Integer; Value: IRibbonCategory);
Index. Position, to which it is inserted.
Value. Tab that must be inserted to the Index position.
The Insert method inserts the specified tab in the specified position in the collection.
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 tab, he must remove it from the collection.
Executing the example requires a form, a button named Button1 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: