# GraffitiActionBar
Class Inherits GraffitiSuite.BaseCanvas
## About
GraffitiActionBar is a recreation of a popular OS X UI element which provides easy access to common actions and interface manipulation.
**
Features:
**
*
Left-side window splitting
*
Right-side window splitting
*
Automatic determination of controls to resize by parent and position
*
Events for Hover, Click, and Resize
## Preview




Previous
Next
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Attributes
| Name | Value |
| --- | --- |
| DefaultEvent | "ButtonClick" |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Alignments | Left <br> Right | Alignment of item within control. |
| HandlePositions | Right <br> Left <br> None | Location of splitter handle. |
| Styles | Glare <br> Graphite <br> FlatDark <br> FlatLight | Available drawing styles. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ButtonClick | ButtonIndex as Integer <br> ButtonPicture as Picture | (None) | Fired when a button has been clicked. |
| ButtonHover | ButtonIndex as Integer <br> ButtonPicture as Picture | (None) | Fired when the mouse is over a button. |
| Resized | (None) | (None) | Fired when the resize handle is used. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | AddButton | (None) | Adds a button to the ActionBar. |
| Function | ButtonCount | As | Returns the count of buttons currently added to the ActionBar (subtract one for iteration). |
| Function | GetButton | As | Returns the picture of the button at Index. |
| Sub | RemoveAll | (None) | Removes all items. |
| Sub | RemoveButton | (None) | Remove the specified button from the ActionBar. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| BGColor | Color | Nil | The background color of the items and UseCustomColors is True. |
| BGHover | Color | Nil | The background color of the items when the mouse is hovering over them and UseCustomColors is True. |
| BGPressed | Color | Nil | The background color of the items when the mouse is pressed on them and UseCustomColors is True. |
| BorderColor | Color | Nil | The border color of the buttons and class when UseCustomColors is True. |
| ButtonPosition | Alignments | Nil | Determines the placement of the buttons in the control's display area. |
| HandleColorDark | Color | Nil | The dark color of the resize handle when UseCustomColors is True. |
| HandleColorLight | Color | Nil | The light color of the resize handle when UseCustomColors is True. |
| HandlePosition | Integer | Nil | The position of the resize handle on the control. |
| MinimumLeft | Integer | Nil | The minimum remaining width to the left of the control on resize. |
| MinimumRight | Integer | Nil | The maximum remaining width to the right of the control on resize. |
| 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 | = | |
| 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 | | Picture | |
| Private | As | = | |
| Private | As | = | |
| Private | | Picture | |
| Private | | Xojo.Rect | |
| Private | As | Nil | |
| Style | Integer | Nil | The appearance of the class and buttons. |
| UseCustomColors | Boolean | Nil | Draws items using the defined colors in the class’s properties. |