# GraffitiButton
Class Inherits GraffitiWebUIControl
## About
A powerful button control with support for embedded spinners, icons, custom styling, and more!
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| FaceStyles | Default <br > Circle | Supported face shapes. |
| SpinnerTypes | Border <br > Grow | Supported spinner styles. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| GotFocus | (None) | (None) | The button received focus. |
| LostFocus | (None) | (None) | The button lost focus. |
| MouseEnter | (None) | (None) | The mouse entered the button's drawable area. |
| MouseExit | (None) | (None) | The mouse has left the button's drawable area. |
| Open | (None) | (None) | (None) |
| Pressed | (None) | (None) | Fired when the user clicks the button, or presses SPACE, RETURN, or ENTER while the button has focus. |
| Shown | (None) | (None) | (None) |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Press | (None) | (None) | Raises the Pressed event. |
| SpinnerHide | (None) | (None) | Hides the AutoDisable spinner. |
| SpinnerShow | (None) | (None) | Shows the AutoDisable spinner. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AutoDisable | Boolean | (None) | When True, clicking will disable the button before sending data back to the server. Must be re-enabled manually. Used to prevent extraneous clicks. |
| AutoDisableShowSpinner | Boolean | (None) | When True, a status spinner will be shown while the button is auto-disabled. |
| Cancel | Boolean | (None) | When True and the user presses the Escape key within its parent without another control first trapping the event, the Pressed event will be raised. |
| Caption | String | (None) | The text of the button. |
| Default | Boolean | (None) | When True and the user presses the Enter key within its parent without another control first trapping the event, the Pressed event will be raised. |
| Enabled | Boolean | (None) | (None) |
| FaceStyle | FaceStyles | (None) | Style of button. |
| IconObject | Picture | (None) | Allows the use of a Xojo picture object. |
| IconObjectHeight | Integer | (None) | The size to display the icon as. If you want it to appear to be 16×16, this property value should be 16. |
| IconObjectWidth | Integer | (None) | The size to display the icon as. If you want it to appear to be 16×16, this property value should be 16. |
| IndicatorBackground | WebUIControl.Indicators | (None) | The Bootstrap Indicator to use for the background of the button. |
| IndicatorBorder | WebUIControl.Indicators | (None) | The Bootstrap Indicator to use for the border of the button. |
| IndicatorSpinner | WebUIControl.Indicators | (None) | Bootstrap Indicator to apply to the status spinner. |
| IndicatorText | WebUIControl.Indicators | (None) | The Bootstrap Indicator to use for the Text/Icon(s) of the button. |
| SpinnerType | SpinnerTypes | (None) | Type of spinner to display. |
| TextStyle | GraffitiStyle | (None) | GraffitiStyle to apply to text. |
## Examples
### FontAwesome Icons
To include FontAwesome icons in your button caption, you should use the FontAwesome identifiers inside angled brackets. For example:
```
<fa fa-camera> Untitled
```
### IconObject Support
To include the IconObject value in your button caption, use the icon tag in your caption. For example:
```
<icon> Untitled
```