# GraffitiToolbar
Class Inherits GraffitiWebUIControl
## About
The original Xojo Web toolbar component! With too many features to list, this control is only outshined by GraffitiControlGroup!
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Alignments | Left <br> Center <br> Right | Supported text alignments. |
| BorderStyles | Dark <br> Light <br> White <br> Primary <br> Secondary <br> Info <br> Success <br> Warning <br> Danger | Supported border styles. |
| BorderTypes | None <br> All <br> Top <br> Right <br> Bottom <br> Left <br> NoTop <br> NoRight <br> NoBottom <br> NoLeft | Supported border drawing types. |
| ButtonStyles | Default <br> Primary <br> Secondary <br> Success <br> Danger <br> Warning <br> Info <br> Light <br> Dark <br> Link | Supported button styles. |
| Corners | None <br> Rounded <br> Top <br> Right <br> Bottom <br> Left <br> Circle | Supported corner types. |
| Directions | Horizontal <br> Vertical | Supported toolbar directions. |
| DisableModes | ModeButton <br> ModeComponent | Supported auto-disable models. |
| IconPositions | Left <br> Top <br> Right <br> Bottom | Supported icon positions relative to text. |
| TextStyles | Default <br> Dark <br> Light <br> White <br> Muted <br> Primary <br> Secondary <br> Info <br> Success <br> Warning <br> Danger | Supported text styles. Equates to Bootstrap indicators. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Action | ClickedButton as GraffitiToolbarItem <br> mouseX as Integer <br> mouseY as Integer <br> buttonDimensions as REALbasic.Rect | (None) | Fired when the button is clicked. |
| ButtonEnter | theButton as GraffitiToolbarItem | (None) | Raised when the mouse enters the specified button. |
| ButtonExit | theButton as GraffitiToolbarItem | (None) | Raised when the mouse exits the specified button. |
| Open | (None) | (None) | |
| Shown | (None) | (None) | |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AddButton | newButton as GraffitiToolbarItem | (None) | Adds newButton to the toolbar. |
| Button | index as Integer | GraffitiToolbarItem | Returns the button at the specified index. |
| ButtonCount | (None) | Integer | Returns the number of buttons currently added to the control. |
| Constructor | (None) | (None) | Creates a new instance of the class. |
| InsertButton | atIndex as Integer <br> newButton as GraffitiToolbarItem | (None) | Inserts newButton at the index supplied. |
| LastButton | (None) | GraffitiToolbarItem | Returns the last added/inserted button. |
| RemoveAll | (None) | (None) | Removes all buttons from the toolbar. |
| RemoveButton | theButton as GraffitiToolbarItem | (None) | Removes the specified button from the toolbar. |
| RemoveButton | index as Integer | (None) | Removes the specified button from the toolbar. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AutoDisable | Boolean | Nil | When True, buttons will automatically be disabled when clicked and must be manually re-enabled. |
| AutoDisableMode | DisableModes | Nil | The method used for AutoDisable. When set to ModeComponent, the entire control will be disabled. ModeButton will disable only the Button that was interacted with. |
| Direction | Directions | Nil | Determines the render direction of the toolbar. |
| ToolbarStyle | WebSDKUIControl.Indicators | Nil | Background color of the toolbar. |