Note: Strictly speaking RibbonButton (and MenuItem) are Objects rather than Methods.
The programmer can create a SisRibbonButton object and then add it to a SisRibbonGroup (section of the ribbon the application will appear under) that has already been defined. Similarly, there is no actual MenuItem Method but a SisMenuItem object.
Adds a custom command to the ribbon Applications tab. See Building GisLink Applications - Adding custom commands.
SisRibbonButton(strText, New SisClickHandler(AddressOf function))
strText, Name of button object. This is the same as the object’s Text property but specified when the object is created.
function, function to call when the button is clicked.
- Is the image always to be shown large.
- The class or group name this command is to be associated with. If set to "Item" or "" then the command will be available for all Item classes.
- Is this to be the default command.
Image always shown large.
Image not always shown large.
The command to be default.
The command not to be default.
- The command name.
- To enable the button, i.e. if the ribbon button is to be shown enabled or greyed out.
The button to be enabled.
The button to be greyed out.
- Optionally specify a named Filter which all selected Items must pass for the command to be available.
- The prompt text to be displayed when the command is highlighted.
- The name of the icon to use.
- Identifier property for the ribbon button (32-bit unsigned integer).
- The name of the large image.
- Optionally specifies a named Spatial Filter which all selected Items must pass for the command to be available.
- The maximum number of Items which may be selected to enable this command. If max is -1 then there is no limit.
- The minimum number of Items which must be selected to make this command valid. If MinSelection is set to -1 then Hittable and Editable Items are valid. If MinSelection is set to 0 then no Items have to be selected. If MinSelection is set to 1 then only Editable Items are valid.
- The minimum status of the Item, i.e. SIS_HITTABLE.
- Read-only property. Gets the parent control of a child button.
- e.g. Set the Parent Control ID to 999. You can then obtain that same ID via the child control using:
- The ribbon group name.
- Sets a button to a “Selected/Highlighted” state. Boolean (True/False):
- Assign a shortcut key (or combination of keys) to a ribbon button.
e.g. Button.ShortcutKeys = Keys.Control Or Keys.X
- Assign a shortcut key (or combination of keys) to a menu item. See ShortcutKeys above for example.
- Note: For ShortcutKeys and ShortcutMenuKeys - When you set the DefaultCommand property of a SisRibbonButton which contains sub-items to false, then a command is executed when you click the icon, and the sub-menu is shown when you click below the icon. These are two different actions, so you need two different shortcuts.
- The ribbon group collection name.
- Get or set the tag.
- Text shown under/next to the button.
- Make a ribbon button visible or invisible.
Dim BigButton As SisRibbonButton = New SisRibbonButton("Translate", New SisClickHandler(AddressOf Translate))
BigButton.LargeImage = True
BigButton.Icon = My.Resources.ButtonImage
BigButton.Help = "Translates multiple files between supported formats"
BigButton.Description = "Batch Translator"