GetCategory

Description

Gets the category according to its handle in the RibbonBar control.

Applies to

RibbonBar controls

Syntax

controlname.GetCategory ( Long ItemHandle, ref RibbonCategoryItem Item )

Argument

Description

controlname

The name of the RibbonBar control.

ItemHandle

The handle of the category you want to obtain.

Item

A RibbonCategoryItem variable in which you want to store the category identified by the item handle.


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, returns null.

Usage

You can also get the category according to its index by using the GetCategoryByIndex function.

You can also get an item according to the handle by using the GetItem function.

Examples

The following code example inserts a "MyCategory" category and then gets a copy of the category by handle and stores it in the lr_Category variable.

Integer li_Return
Long ll_Handle
RibbonCategoryItem lr_Category

ll_Handle = rbb_1.InsertCategoryLast ("MyCategory")
li_Return = rbb_1.GetCategory (ll_Handle, lr_Category)

See also

InsertCategory

InsertCategoryFirst

InsertCategoryLast

DeleteCategory

SetCategory

GetCategoryByIndex

GetCategoryCount

SetActiveCategory

GetActiveCategory