Description
Inserts a category as the first item in the RibbonBar control.
Applies to
Syntax
controlname.InsertCategoryFirst ( String Text )
controlname.InsertCategoryFirst ( RibbonCategoryItem Item )
Argument |
Description |
---|---|
controlname |
The name of the RibbonBar control. |
Text |
The title of the category to be inserted. |
Item |
A category item to be inserted. |
Return value
Long.
Returns the handle of the inserted item if it succeeds and -1 if an error occurs. If any argument's value is null, returns null.
Example 1
This example inserts the "MyCategory1" category as the first category in the ribbon bar.
Long ll_Handle ll_Handle = rbb_1.InsertCategoryFirst ("MyCategory1")
Example 2
This example also inserts the "MyCategory1" category as the first category in the ribbon bar. It first defines a category item with various properties (including Text, Tag etc.) and then inserts it as the first category in the ribbon bar.
Long ll_Handle RibbonCategoryItem lr_Category lr_Category.Text = "MyCategory1" lr_Category.Tag = "MyCategory1" ll_Handle = rbb_1.InsertCategoryFirst (lr_Category)
See also