Table of Contents
Preview #
About #
GraffitiSearchField is a customizable and highly-capable search textfield component that’s designed to be both powerful and visually appealing.
Features:
- History
- Autocomplete
- Clear Button
- Customizable Appearance
Enumerations #
This class exposes no enumerations.
Constants #
This class exposes no constants.
Events #
Name | Parameters | Return Type | Description |
---|---|---|---|
EnterPressed | None | None | Raised when the user presses the Enter key. |
HistoryCleared | None | None | Raised when the user clears the history using the “Clear” item in the history menu. |
TextChanged | None | None | Raised when the user has changed the text content of the search field. |
TextCleared | None | None | Raised when the user has cleared the field’s value by clicking the clear icon. |
Methods #
Name | Parameters | Return Type | Description |
---|---|---|---|
AddHistory | items() as String | None | Adds the items() array items to the history. |
AddHistory | ParamArray text as String | None | Adds the items from the parameter array to the history. |
History | None | String | Returns a comma separated list of history items. |
History | Assigns items as String | None | Adds a comma separated list of history items. |
RemoveHistory | text as String | None | Removes the specified item from the history. |
Properties #
Name | Type | Default Value | Description |
---|---|---|---|
AddSearchesToHistory | Boolean | True | Adds new searches to the internal history. Searches are added on EnterPressed. |
Autocomplete | Boolean | True | When True, the control will attempt to autocomplete from the added history values by extending the text to display a matching result. |
BackgroundColor | ColorGroup | Nil | Color applied to the component’s background. |
BorderRadius | Integer | 8 | Radius of the component’s corners. |
ClearButtonColor | ColorGroup | Nil | Color applied to the clear button. |
HasClearButton | Boolean | True | Control display and function of the clear button. |
HasHistory | Boolean | True | Controls display and function of the history icon, which replaces the magnifier icon when this property value is True. |
Hint | String | “Search…” | Placeholder text when the field has no text value. |
HistoryClearText | String | “Clear…” | Text displayed in the history menu for the item used to clear history. |
InitialHistory | String | “” | Supports an initial comma separated string for adding default history items. |
MagnifierColor | ColorGroup | Nil | Color applied to the magnifier or history icons. |
Text | String | “” | Current field text. |
TextBold | Boolean | False | Determines the font weight of the field text. |
TextColor | ColorGroup | Nil | Color applied to the text. |
TextFont | String | “System” | Font face applied to the text. |
TextItalic | Boolean | False | Controls the obliqueness of the text. |
TextSize | Integer | 0 | Size of the text displayed within the component. |
TextUnderline | Boolean | False | Controls the underline text decoration effect. |
UseCustomColors | Boolean | False | Determines whether the component will draw itself using the various Color properties rather than the defaults. |