GetComboBox

Description

Gets the combo box according to the handle in the RibbonBar control.

Applies to

RibbonBar controls

Syntax

controlname.GetComboBox ( Long ItemHandle, ref RibbonComboBoxItem Item )

Argument

Description

controlname

The name of the RibbonBar control.

ItemHandle

The handle for the combo box you want to obtain.

Item

A RibbonComboBoxItem variable in which you want to store the combo box 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 an item according to the handle by using the GetItem function.

Examples

The following code example inserts a combo box to the "MyPanel" panel and then gets a copy of the combo box according to its handle and stores it in the lr_ComboBox variable.

Integer li_Return
Long ll_Handle_Category, ll_Handle_Panel, ll_Handle_ComboBox
RibbonComboBoxItem lr_ComboBox

ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory")
ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "MyPanel", "AddSmall!")
ll_Handle_ComboBox = rbb_1.InsertComboBoxFirst (ll_Handle_Panel, "Ue_ComboBoxSelectionChanged")
li_Return = rbb_1.GetComboBox (ll_Handle_ComboBox, lr_ComboBox)

See also

InsertComboBox

InsertComboBoxFirst

InsertComboBoxLast

DeleteComboBox

SetComboBox

GetChildItemByIndex