GetApplicationButton
PowerScript function
Description
Gets the application button of the RibbonBar control.
Applies to
Syntax
|
1 |
controlname.GetApplicationButton ( ref RibbonApplicationButtonItem Item ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the RibbonBar control. |
|
Item |
A RibbonApplicationButtonItem variable in which you want |
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.
Examples
This example sets the Text property of the application button to
“MyApp” and then gets a copy of the application button and stores it in
the lr_AppButton2 variable.
|
1 2 3 4 5 6 |
Integer li_Return RibbonApplicationButtonItem lr_AppButton, lr_AppButton2 lr_AppButton.Text = "MyApp" li_Return = rbb_1.SetApplicationButton(lr_AppButton) li_Return = rbb_1.GetApplicationButton(lr_AppButton2) |
See also