DeleteComboBox

Description

Removes a combo box from the panel or group of the RibbonBar control.

Applies to

RibbonBar controls

Syntax

controlname.DeleteComboBox ( Long ItemHandle )

Argument

Description

controlname

The name of the RibbonBar control.

ItemHandle

The handle of the combo box you want to delete.


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 delete an item according to the handle by using the DeleteItem function.

Examples

The example gets the combo box whose index number is 1 in the "MyPanel" panel and then deletes it according to its handle.

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.GetChildItemByIndex (ll_Handle_Panel, 1, lr_ComboBox)
If li_Return = 1 Then
 li_Return = rbb_1.DeleteComboBox (lr_ComboBox.ItemHandle)
End If

See also

InsertComboBox

InsertComboBoxFirst

InsertComboBoxLast

SetComboBox

GetComboBox

GetChildItemByIndex