Description
Sets the tab button for the RibbonBar control.
Applies to
RibbonBar controls
Syntax
controlname.SetTabButton ( Long ItemHandle, RibbonTabButtonItem Item )
Argument |
Description |
---|---|
controlname |
The name of the RibbonBar control. |
ItemHandle |
The handle of the tab button on the same level that you will set the tab button. |
Item |
A tab button item you are setting. |
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 use the SetItem function to set the tab button. Refer to SetItem for the difference between SetItem and SetTabButton.
The user events to be bound with the tab button must be defined correctly according to the requirements of RibbonTabButtonItem. For details, see Clicked and Selected.
Examples
This example inserts the "TabButton1" tab button and binds it with the "Ue_TabButtonClicked" user event, and then sets new values for various properties (including Text, PictureName, Clicked, Selected etc.) of this tab button.
Integer li_Return Long ll_Handle RibbonTabButtonItem lr_TabButton ll_Handle = rbb_1.InsertTabButtonFirst ("TabButton1", "ArrowUpSmall!", "Ue_TabButtonClicked") lr_TabButton.Text = "TabButton2" lr_TabButton.PictureName = "HelpSmall!" lr_TabButton.Clicked = "Ue_TabButtonClicked2" lr_TabButton.Selected = "Ue_TabButtonSelected" li_Return = rbb_1.SetTabButton (ll_Handle, lr_TabButton)
See also