# GraffitiFieldLabel
Class Inherits GraffitiSuite.BaseCanvas
## About
GraffitiFieldLabel is a TextField parent designed to make your forms both easier to manage and look great! With a wide array of features, you can accomplish many things that would take hundreds or thousands of hours to code and implement yourself!
Features:
*
Autocomplete by Line
*
Autocomplete by Word
*
Label positioning left or right
*
Automatic or static label width
*
Clear button
*
Icon support in Label
GraffitiFieldLabelContainer embed containers within a similar UI to GraffitiFieldLabel for consistent representation across your project.
## Preview


Previous
Next
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Attributes
| Name | Value |
| --- | --- |
| DefaultEvent | "TextChanged" |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Alignments | Left <br> Center <br> Right | Possible element alignment values. |
| Positions | Left <br> Right | Possible element position values. |
| VerticalAlignments | Middle <br> Top <br> Bottom | Possible element vertical alignment values. |
## Constants
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| kModeLine | Double | 0 | Autocomplete mode by line. |
| kModeWord | Double | 1 | Autocomplete mode by word. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ClearClicked | (None) | (None) | Fired when the user clicks the clear button. |
| Closing | (None) | (None) | |
| DoSearch | SearchFor as String | (None) | Fired when the users presses Enter or Return in the field. |
| LabelClicked | (None) | (None) | Fired when the user clicks the label. |
| PositionControl | byRef position as Xojo.Rect | (None) | Fired when the control is being positioned. Modify the values of the rect to alter its position. |
| TextChanged | (None) | (None) | Raised when the hosted control is a TextField or TextArea and its value changes. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AutoComplete | Boolean | Nil | When True, the control will attempt to autocomplete the text as it is typed. |
| AutoCompleteMode | Integer | Nil | The mode to use for autocompleting entered text. |
| AutoCompleteValues() | String | Nil | Array of values used for autocompleting. |
| BorderColor | Color | Nil | Color used to draw the border of the component when SystemColors = False. |
| BorderRadius | Double | Nil | Radius of control corners. |
| ClearIcon | Picture | Nil | If supplied, will override the default clear icon. For best results, use scaled images that are no larger than 64 pixels by 64 pixels. |
| Enabled | Boolean | Nil | |
| Field | DesktopUIControl | Nil | The UI element instance to incorporate. |
| FieldBackColor | Color | Nil | Color used to draw the backcolor of the component and apply to the TextField when SystemColors = False. |
| FieldTextColor | Color | Nil | Color applied to the TextField's text when SystemColors = False. |
| FieldTextFont | String | Nil | Font applied to the TextField's text. |
| FieldTextSize | Integer | Nil | Size of the text in the TextField. |
| Icon | Picture | Nil | Icon draw in the label portion. |
| IconPosition | Positions | Nil | Position of icon in the label. |
| Label | String | Nil | Label text. |
| LabelBackColor | Color | Nil | Color applied to the label segment when SystemColors = False. |
| LabelPosition | Positions | Nil | Position of the label in relation to the TextField. |
| LabelTextAlignment | Alignments | Nil | Position of the label's content. |
| LabelTextAlignmentVertical | VerticalAlignments | Nil | Position of the label's content. |
| LabelTextBold | Boolean | Nil | Font weight of the label text. |
| LabelTextColor | Color | Nil | Color applied to the label text when SystemColors = False. |
| LabelTextFont | String | Nil | Font used to draw label text. |
| LabelTextItalic | Boolean | Nil | Determines whether the label's text will be drawn italicized. |
| LabelTextSize | Integer | Nil | Font size of label text. |
| LabelTextUnderline | Boolean | Nil | Underline decoration for label text. |
| LabelWidth | Integer | Nil | Width of the label area. Use -1 for auto. |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| 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 | = | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| 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 | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| ResizeFieldHeight | Boolean | True | When True, will resize the contained control to fill the area. |
| ResizeFieldWidth | Boolean | True | When True, will resize the contained control to fill the area. |
| ShiftClearIcon | Boolean | Nil | When True, the clear icon will be color shifted to match the current system theme. |
| ShiftIcon | Boolean | Nil | When True, the component will attempt to shift the icon's colors. Use transparent icons for best effect. |
| ShowClearButton | Boolean | Nil | If True, the clear button x will be shown in the field on the opposite side of the TextField from the label. |
| SystemColors | Boolean | Nil | When False, the component will use the colors assigned to the various properties. When True, the control attempts to use the system defined colors. Dark Mode adaptive. |
| Text | String | Nil | Returns the value of the control when it is of type DesktopTextField or DesktopTextArea. Read-only. |