# GraffitiTagField
Class Inherits GraffitiSuite.BaseCanvas
## About
A class that emulates popular tag selection fields. Has an excellent built-in search, and many customization options.
## Preview



Previous
Next
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Attributes
| Name | Value |
| --- | --- |
| DefaultEvent | "SelectionChanged" |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Opening | (None) | (None) | |
| ScrollChange | (None) | (None) | Raised when the scroll position has changed. |
| SearchFailed | SearchText as String | (None) | Raised when a user’s search has failed to find any matches. |
| SelectionChanged | (None) | (None) | Raised when the selected items has changed. |
| TagAdded | newTag as GraffitiTagFieldItem | (None) | Raised when the user attempts to add a new tag. |
| TagMouseEnter | tag as GraffitiTagFieldItem | (None) | Raised when the user’s mouse enters a tag. |
| TagMouseExit | tag as GraffitiTagFieldItem | (None) | Raised when the user’s mouse exits a tag. |
| TagRemoved | RemovedTag as GraffitiTagFieldItem | (None) | Raised when a tag is removed. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | Add | (None) | Used to add an item to the control array. |
| Attributes | Hidden | CallTagAdded | |
| Function | FindItem | As | Returns the index of the item with ItemText in the Items array. |
| Function | IndexOf | As | Returns the index of the specified item in the items array. |
| Function | ItemAt | As | Returns the item as the specified index. |
| Function | LastItemIndex | As | Returns the index of the last tag. |
| Sub | Remove | (None) | Removes the specified item from the internal items array. |
| Sub | RemoveAll | (None) | Removes all items from the component. |
| Sub | RemoveAt | (None) | Removes item at ItemIndex from Items(). |
| Function | SelectedItems | As | Returns an array of all currently selected items. |
| Attributes | Hidden | UpdateProperty | |
| Attributes | Hidden | UpdatePropertyMultiple | |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Attributes | SearchField | Nil | |
| BackColor | Color | Nil | The background color of the field and canvas. |
| BorderColor | Color | Nil | The border color of the canvas. |
| BorderRadius | Integer | Nil | The radius of the border corners. |
| CloseIconColor | Color | Nil | The color used to draw the close icon for the tags in the canvas. |
| ExactMatchesOnly | Boolean | False | If True, searches will only show those items that exactly match the search string. |
| FromPopup | Boolean | False | |
| hoverItem | GraffitiTagFieldItem | Nil | |
| ItemBackColor | Color | Nil | The color used for the list. |
| ItemBorderColor | Color | Nil | The border color. |
| ItemBorderRadius | Integer | Nil | The border radius for tags in the canvas. |
| Items() | GraffitiTagFieldItem | Nil | The array of GraffitiTagFieldItems that the class uses. |
| ItemTextBold | Boolean | Nil | Determines whether tags drawn in the canvas have bold text. |
| ItemTextColor | Color | Nil | The text color. |
| ItemTextFont | String | Nil | The font face used for tags. |
| ItemTextItalic | Boolean | Nil | Determines whether tags drawn in the canvas have italic text. |
| ItemTextSize | Integer | Nil | Sets the text size of tags drawn in the canvas. |
| ItemTextUnderline | Boolean | Nil | Determines whether tags drawn in the canvas have underlined text. |
| Padding | Integer | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | = | |
| 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 | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Scroller | DesktopScrollbar | Nil | |
| ScrollMax | Integer | Nil | Maximum scroll position. |
| ScrollPosition | Integer | Nil | Current scroll location. |
| SearchThreshold | Integer | Nil | The number of characters before a search operation is carried out. |
| UseCustomColors | Boolean | Nil | When True, color properties will override default drawing. |