# 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) | (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 |
| --- | :---: | :---: | --- |
| Add | NewItem as GraffitiTagFieldItem <br> RefreshNow as Boolean = True | (None) | Used to add an item to the control array. |
| FindItem | ItemText as String | Integer | Returns the index of the item with ItemText in the Items array. |
| IndexOf | item as GraffitiTagFieldItem | Integer | Returns the index of the specified item in the items array. |
| ItemAt | index as Integer | GraffitiTagFieldItem | Returns the item as the specified index. |
| LastItemIndex | (None) | Integer | Returns the index of the last tag. |
| Remove | item as GraffitiTagFieldItem | (None) | Removes the specified item from the internal items array. |
| RemoveAll | (None) | (None) | Removes all items from the component. |
| RemoveAt | ItemIndex as Integer | (None) | Removes item at ItemIndex from Items(). |
| SelectedItems | (None) | GraffitiTagFieldItem | Returns an array of all currently selected items. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Attributes | SearchField | (None) | (None) |
| BackColor | Color | (None) | The background color of the field and canvas. |
| BorderColor | Color | (None) | The border color of the canvas. |
| BorderRadius | Integer | (None) | The radius of the border corners. |
| CloseIconColor | Color | (None) | 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 | (None) |
| hoverItem | GraffitiTagFieldItem | (None) | (None) |
| ItemBackColor | Color | (None) | The color used for the list. |
| ItemBorderColor | Color | (None) | The border color. |
| ItemBorderRadius | Integer | (None) | The border radius for tags in the canvas. |
| Items() | GraffitiTagFieldItem | (None) | The array of GraffitiTagFieldItems that the class uses. |
| ItemTextBold | Boolean | (None) | Determines whether tags drawn in the canvas have bold text. |
| ItemTextColor | Color | (None) | The text color. |
| ItemTextFont | String | (None) | The font face used for tags. |
| ItemTextItalic | Boolean | (None) | Determines whether tags drawn in the canvas have italic text. |
| ItemTextSize | Integer | (None) | Sets the text size of tags drawn in the canvas. |
| ItemTextUnderline | Boolean | (None) | Determines whether tags drawn in the canvas have underlined text. |
| Padding | Integer | (None) | (None) |
| Scroller | DesktopScrollbar | (None) | (None) |
| ScrollMax | Integer | (None) | Maximum scroll position. |
| ScrollPosition | Integer | (None) | Current scroll location. |
| SearchThreshold | Integer | (None) | The number of characters before a search operation is carried out. |
| UseCustomColors | Boolean | (None) | When True, color properties will override default drawing. |