InsertTabButtonFirst
PowerScript function
Description
Inserts a tab button as the first item in the RibbonBar
control.
Applies to
Syntax
|
1 |
controlname.InsertTabButtonFirst ( String Text, String PictureName, String Clicked ) |
|
1 |
controlname.InsertTabButtonFirst ( RibbonTabButtonItem Item ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the RibbonBar control. |
|
Text |
The text that displays in the tab button. |
|
PictureName |
The name of the file that contains the picture. It will be |
|
Clicked |
The name of the Clicked user event to be bound with the |
|
Item |
A tab button item you want to insert. |
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.
Usage
The user events to be bound with the tab button must be defined
correctly according to the requirements of RibbonTabButtonItem. For
details, see Clicked in PowerScript Reference and Selected in PowerScript Reference.
Example 1
This example inserts the “TabButton1” as the first tab button in the
ribbon bar, and binds it with the “Ue_TabButtonClicked” user event.
|
1 2 |
Long ll_Handle ll_Handle = rbb_1.InsertTabButtonFirst ("TabButton1", "ArrowUpSmall!", "Ue_TabButtonClicked") |
Example 2
This example inserts the “TabButton1” as the first tab button in the
ribbon bar, and binds it with the “Ue_TabButtonClicked” and
“Ue_TabButtonSelected” user events. It first defines a tab button item
with various properties (including Text, PictureName, Clicked, Selected
etc.) and then inserts it as the first tab button in the ribbon
bar.
|
1 2 3 4 5 6 7 8 |
Long ll_Handle RibbonTabButtonItem lr_TabButton lr_TabButton.Text = "TabButton1" lr_TabButton.PictureName = "ArrowUpSmall!" lr_TabButton.Clicked = "Ue_TabButtonClicked" lr_TabButton.Selected = "Ue_TabButtonSelected" ll_Handle = rbb_1.InsertTabButtonFirst (lr_TabButton) |
See also