# GraffitiRibbon
Class Inherits GraffitiSuite.BaseCanvas
## About
GraffitiRibbon emulates the visual style of recent Microsoft applications (as well as the many other applications applying the principle since its introduction). It can also be used without the tab bar to create a powerful and beautiful toolbar.Features:
*
Tabs
*
Groups
*
Columns
*
Static Button
*
Multiple Button Styles
*
RectControl and ContainerControl embedding
*
Custom Colors
*
Responsive Resizing of Elements
## Preview

Previous
Next
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Attributes
| Name | Value |
| --- | --- |
| DefaultEvent | "Opening" |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Styles | Automatic <br> Light <br> Dark | Supported drawing styles. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ButtonClick | button as GraffitiRibbonButton | (None) | Fires when a button is clicked. This can be any of the button types, so you should use IsA to check the value. |
| ButtonMenu | button as GraffitiRibbonButton <br> menuSelection as DesktopMenuItem | (None) | Fires when a MenuItem child of a Button is selected. |
| ItemHover | item as GraffitiRibbonItem | (None) | Can be any item type, use IsA along with one of the Shared Methods to check value. |
| Opening | (None) | (None) | |
| TabChange | (None) | (None) | Fires when the user selects a different tab. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | AddTab | (None) | Adds the specified tab to the UI. |
| Function | Child | As | Returns the tab specified by tabIndex |
| Sub | Constructor | (None) | Creates a new instance of the class. |
| Function | Count | As | Returns the total number of children, this is the LastRowIndex + 1 |
| Function | FindByCaption | As | Iterates over all children regardless of depth to find an exact match for the supplied parameter. |
| Function | FindByTag | As | Iterates over all children regardless of depth in an attempt to match the supplied Tag. |
| Attributes | Hidden | Function | |
| Attributes | Hidden | Function | |
| Attributes | Hidden | Function | |
| Function | LastTabIndex | As | Returns the index of that last GraffitiRibbonTab. |
| Sub | Remove | (None) | Removes the tab at the specified index. |
| Sub | Remove | (None) | Removes the tab at the specified index. |
| Sub | RemoveAll | (None) | Removes all tabs. |
| Function | Tab | As | Returns the GraffitiRibbonTab at the specified index. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| BackgroundColor | Color | Nil | Background color of the control when CustomColors = True. |
| ButtonBackgroundColor | Color | Nil | Default button background color. |
| ButtonBackgroundColorDown | Color | Nil | Button background color while mouse is down. |
| ButtonBackgroundColorHover | Color | Nil | Button background color while mouse is hovering. |
| ButtonBorderColor | Color | Nil | Default button border color. |
| ButtonBorderColorDown | Color | Nil | Button border color while mouse is down. |
| ButtonBorderColorHover | Color | Nil | Button border color while mouse is hovering. |
| ButtonTextColor | Color | Nil | Default button text color. |
| ButtonTextColorDown | Color | Nil | Button text color while mouse is down. |
| ButtonTextColorHover | Color | Nil | Button text color while mouse is hovering. |
| CustomColors | Boolean | Nil | When True, color properties will be applied to drawing. |
| GroupBackgroundColor | Color | Nil | Background color for groups. |
| GroupBorderColor | Color | Nil | Border color for groups. |
| GroupTextColor | Color | Nil | Default text color for groups. |
| GroupTextColorDown | Color | Nil | Text color for groups while mouse is down. |
| GroupTextColorHover | Color | Nil | Text color for groups while mouse is hovering. |
| HasBorder | Boolean | Nil | When False, the control will not automatically draw the appropriate border based on placement. |
| LockUpdate | Boolean | Nil | When True, redrawing is delayed until LockUpdate is again set to False. |
| Private | | GraffitiRibbonTab | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | | GraffitiRibbonItem | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | | GraffitiRibbonTab | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| SelectedTab | GraffitiRibbonTab | Nil | The currently selected tab item. |
| ShiftIconsByStyle | Boolean | Nil | When True, GraffitiRibbon will attempt to recolor icons appropriately for the selected Style. |
| StaticButton | GraffitiRibbonButton | Nil | Button to display to the far-right of the tab bar. |
| Style | Styles | Nil | The currently used color scheme. If CustomColors is True, then all colors for the style are overridden by the Color properties. |
| TabBackgroundColor | Color | Nil | Background color of tabs. |
| TabBackgroundColorHover | Color | Nil | Background color of tabs when hovered. |
| TabBarVisible | Boolean | Nil | When False, the tab bar and StaticButton are hidden. |
| TabBorderColor | Color | Nil | Border color of tabs. |
| TabBorderColorHover | Color | Nil | Border color of tabs when hovered. |
| TabCaretColor | Color | Nil | Default color for the tab's disclosure arrow. |
| TabCaretColorDown | Color | Nil | Tab disclosure arrow's color when mouse is down. |
| TabCaretColorHover | Color | Nil | Tab disclosure arrow's color when mouse is hovering. |
| TabTextColor | Color | Nil | Text color of tabs. |
| TabTextColorHover | Color | Nil | Text color of tabs when hovered. |
| TabTextColorSelected | Color | Nil | Text color of tabs when selected. |
| TickColor | Color | Nil | Disclosure tick color for groups/columns/buttons with menus or too many items for display. |
| TickColorDown | Color | Nil | Disclosure tick color for groups/columns/buttons with menus or too many items for display when mouse is down. |
| TickColorHover | Color | Nil | Disclosure tick color for groups/columns/buttons with menus or too many items for display when mouse is hovering. |