Description
Sets the application button for the RibbonBar control.
Applies to
RibbonBar controls
Syntax
controlname.SetApplicationButton ( RibbonApplicationButtonItem Item )
Argument |
Description |
---|---|
controlname |
The name of the RibbonBar control. |
Item |
The application button item you want to set. |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, returns null.
Usage
Only one application button is allowed in a ribbon bar, therefore, you can directly get (set or remove) the application button without needing to insert the application button first or identify the application button by its handle.
You can also use the SetItem function to set the application button. Refer to SetItem for the difference between SetItem and SetApplicationButton.
Examples
This example sets the value of the Text property of the application button to "MyApp".
Integer li_Return RibbonApplicationButtonItem lr_AppButton lr_AppButton.Text = "MyApp" li_Return = rbb_1.SetApplicationButton(lr_AppButton)
See also