Page History
...
Element | Description | Version Introduced | Pro Version Introduced |
---|---|---|---|
<Tab> | A single tab that contains groups. | 1.0 | 3.2 |
...
Element | Description | Appears | Version Introduced | Pro Version Introduced |
---|---|---|---|---|
<Button> | A button control associated with a command. | Zero or once | 1.0 | 3.2 |
<CheckBox> | A check box control. | Zero or once | 1.0 | 3.2 |
<ComboBox> | A combo box control. | Zero or once | 1.0 | 3.2 |
<DateField> | A date field control with a calendar drop down. | Zero or once | 1.0 | 3.2 |
<EditField> | An edit field control. | 1.0 | 3.2 | |
<Label> | A label control that only display some text. | 1.0 | 3.2 | |
<SplitButton> | A button control with a drop down that can contain other controls. | Zero or once | 1.0 | 3.2 |
...
The Key attribute defines a unique identifier for the group. The identifier must be unique among groups but can share the same identifier as other elements such as commands or tabs. The identifier is used to reference the group in properties and methods such as the GroupVisible property.
OptionButton
The OptionButton attribute can be set to "True" or "False". If set to "True", then a button appears at the bottom right corner. When clicked, it fires the OnGroupOptionClick event.
Tooltip
The Tooltip attribute sets the text to appear when the user hovers over the group.
...
The Group element defines a group within a tab. Groups contain any number of controls. They also have a caption along the bottom and an optional button in the bottom right corner. To enable the button, set the OptionButton attribute to "True". This will display the button which will fire an OnGroupOptionClick event when clicked. Like all other elements in the ribbon, you must assign each group a unique key for later identification.
...
As the ribbon's size changes, groups automatically adjust the layout of their controls. You have no control over how this occurs. You'll just have to trust their magic. When a group gets too small to display all its controls, it collapses. A collapsed group becomes a button with an icon and caption, which you set with Icon and Caption attributes respectively. When the user clicks on the button, the group appears as a popup and everything works normally from there. It's a good habit to set the Icon attribute for each group.
Example
Code Block |
---|
<Group Key="CLIPBOARD" Caption="Clipboard" OptionButton="true" Icon="Images\32x32\clipboard.png"> <SplitButton Key="SPL_PASTE"> <Command Key="PASTE" Caption="Paste" Shortcut="Alt+F1" LargeIcon="Images\32x32\clipboard_paste.png" SmallIcon="Images\16x16\clipboard_paste.png" Tooltip="Inserts text from the clipboard." /> <Button Key="BTN_PASTEWITHFORMAT"> <Command Key="PASTEWITHFORMAT" Caption="Keep Source Formatting" LargeIcon="Images\32x32\clipboard_paste.png" SmallIcon="Images\16x16\clipboard_paste.png" Tooltip="Inserts formatted text from the clipboard." /> </Button> <Button Key="BTN_PASTEMERGE"> <Command Key="PASTEMERGE" Caption="Merge Formatting" Enabled="False" LargeIcon="Images\32x32\clipboard-add2.png" SmallIcon="Images\16x16\clipboard-add2.png" Tooltip="Inserts text from the clipboard using the current selection's formatting." /> </Button> <Button Key="BTN_PASTETEXTONLY"> <Command Key="PASTETEXTONLY" Caption="Keep Text Only" LargeIcon="Images\32x32\clipboard.png" SmallIcon="Images\16x16\clipboard.png" Tooltip="Inserts text only from the clipboard." /> </Button> </SplitButton> <Button Key="BTN_CUT"> <Command Key="CUT" Caption="Cut" KeyboardTip="X" Shortcut="Ctrl+X" SmallIcon="Images\16x16\clipboard_cut.png" Tooltip="Copies the selection to the clipboard then deletes it." /> </Button> <Button Key="BTN_COPY"> <Command Key="COPY" Caption="Copy" KeyboardTip="C" Shortcut="Ctrl+C" SmallIcon="Images\16x16\clipboard_copy.png" Tooltip="Copies the selection to the clipboard." /> </Button> <Button Key="BTN_FORMATPAINT"> <Command Key="FORMATPAINT" Caption="Format Painter" SmallIcon="Images\16x16\brush.png" Tooltip="Formats the selection." /> </Button> </Group> |
...