ScriptRibbonPage
The ScriptRibbonPage object represents a ribbon page that can be added to a form's ribbon to contain buttons used by an addon. ScriptRibbonPage objects are used for adding ribbon pages to the ribbon bar. The pages contain ScriptRibbonButton objects which can be bound to methods in addon scripts so that the bound method executes when the button is clicked.
Properties
- None
Methods
ClearButtons()
Removes all buttons currently on the ribbon page.
It is not necessary to call ClearButtons as a clean up process, as they are automatically removed when the ribbon page is destroyed.
CreateButton(string name, Image icon, string clickHandler, string groupName)
Creates and displays a new button on the ribbon page
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | name | The name of the button, which is also used as the button text |
Input | icon | The icon to display on the button |
Input | clickHandler | The name of the Lua method that should be called when the button is clicked |
Input | groupName | The name of the ribbon page group the button should be placed in |
Output | ScriptRibbonButton |
GetRibbonButton(string buttonName)
Retrieves the button whose name matches the button name provided.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | buttonName | The name of the button to be retrieved |
Output | ScriptRibbonButton |
RemoveButton(ScriptRibbonButton button)
Removes the given ScriptRibbonButton from the ribbon page.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | button | The ScriptRibbonButton to be removed |
It is not necessary to call RemoveButton as a clean up process, as they are automatically removed when the ribbon page is destroyed.