# GraffitiSelectGroup
Class Inherits GraffitiUIControl
## About
This is a beautiful class that can easily replace any number of UI elements. It behaves similarly to a RadioButton group, but allows for single or multiple selection, a title, subtitle, and three nicely drawn icon types.
## Attributes
| Name | Value |
| --- | --- |
| DefaultEvent | "ValueChanged" |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| SelectionModes | Single <br > Multiple | Allowed selection types. |
| ValueTypes | Check <br > Dash <br > Radio | Icon types displayed in items when Value = True |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| FocusChanged | (None) | (None) | Raised when the control's item focus has shifted. |
| HeightChanged | (None) | (None) | Raised when AdaptiveHeight = True and the height of the control has changed. |
| ItemDoublePressed | item as GraffitiSelectGroupItem | (None) | Raised when the user double-presses an item. |
| ValueChanged | (None) | (None) | Raised when an item has been selected or deselected.\ |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Add | item as GraffitiSelectGroupItem | (None) | Adds the specified item to the control. |
| AddAt | index as Integer <br> item as GraffitiSelectGroupItem | (None) | Adds the specified item at the supplied index. |
| DeselectAll | (None) | (None) | Deselects all currently selected items. |
| DeselectItem | item as GraffitiSelectGroupItem | (None) | Deselects the specified item. |
| IndexOf | item as GraffitiSelectGroupItem | Integer | Returns the index of the item within the internal items array, or -1 when not found. |
| Invalidate | item as GraffitiSelectGroupItem | (None) | Signals the control to redraw the specified item. |
| InvalidateAll | (None) | (None) | Signals the control that all items must be redrawn. |
| ItemAt | index as Integer | GraffitiSelectGroupItem | Returns the item as the specified index within the internal items array, or Nil when not found. |
| ItemFromPoint | position as Point | GraffitiSelectGroupItem | Returns the item at the given point within its display. |
| ItemFromXY | x as Integer <br> y as Integer | GraffitiSelectGroupItem | Returns the item at the given point within its display. |
| LastIndex | (None) | Integer | The index of the last item within the internal items array. |
| Remove | item as GraffitiSelectGroupItem | (None) | Removes the specified item. |
| RemoveAll | (None) | (None) | Removes all items from the control. |
| RemoveAt | index as Integer | (None) | Removes the item at the specified index. |
| ScrollTo | item as GraffitiSelectGroupItem | (None) | Scrolls the display to the specified item. |
| SelectAll | (None) | (None) | Sets all items' values to True. |
| SelectedItem | (None) | GraffitiSelectGroupItem | Returns the first selected item. |
| SelectedItems | (None) | GraffitiSelectGroupItem | Returns an array of all selected items. |
| SelectedItemText | (None) | String | Returns the text of the first selected item. |
| SelectItem | item as GraffitiSelectGroupItem | (None) | Selects the specified item. |
| ToggleSelection | (None) | (None) | Toggles all item values. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AllowDeselectOnSingle | Boolean | (None) | When True and SelectionMode = Single, the selected item can be deselected by the user. |
| AutoHeight | Boolean | (None) | When True, the control will adapt its height to fit its contents |
| BackgroundColor | ColorGroup | (None) | Color drawn to the background of the control. |
| BorderColor | ColorGroup | (None) | Color used to draw the control's border. |
| BorderRadius | Double | (None) | Control's border radius. |
| BorderSize | Double | (None) | Size of the control's border. |
| HasBackgroundColor | Boolean | (None) | Controls drawing of the control's background. |
| ItemBackgroundColor | ColorGroup | (None) | Color used to draw items' background. |
| ItemBackgroundColorHover | ColorGroup | (None) | Color used to draw items' background when hovered. |
| ItemBackgroundColorSelected | ColorGroup | (None) | Color used to draw items' background when selected. |
| ItemBorderColor | ColorGroup | (None) | Color used to draw items' border. |
| ItemBorderColorHover | ColorGroup | (None) | Color used to draw items' border when hovered. |
| ItemBorderColorSelected | ColorGroup | (None) | Color used to draw items' border when selected. |
| ItemBorderRadius | Integer | (None) | Radius of items' corners. |
| ItemBorderSize | Double | (None) | Size of items' border. |
| ItemFontName | String | (None) | Font face used for drawing items' text. |
| ItemFontSize | Integer | (None) | Font size used for drawing items' text. |
| ItemTextColor | ColorGroup | (None) | Color used for drawing items' text. |
| ItemTextColorHover | ColorGroup | (None) | Color used for drawing items' text when hovered. |
| ItemTextColorSelected | ColorGroup | (None) | Color used for drawing items' text when selected. |
| ItemValueColorHover | ColorGroup | (None) | Color used for drawing items' value icon when hovered. |
| ItemValueColorSelected | ColorGroup | (None) | Color used for drawing items' value icon when selected. |
| MaximumHeight | Integer | (None) | Maximum height of control when AutoHeight = True. |
| SelectionMode | SelectionModes | (None) | Determines the control's selection mode operation. |
| Subtitle | String | (None) | Text displayed as the subtitle. |
| SubtitleAlignment | TextAlignments | (None) | Alignment of the subtitle text. |
| SubtitleBold | Boolean | (None) | Controls the font weight of the subtitle. |
| SubtitleColor | ColorGroup | (None) | Color used to draw the control's subtitle. |
| SubtitleFontName | String | (None) | Font face used to draw the control's subtitle. |
| SubtitleFontSize | Integer | (None) | Font size used to draw the control's subtitle. |
| SubtitleItalic | Boolean | (None) | Controls the obliqueness of the control's subtitle text. |
| SubtitleUnderline | Boolean | (None) | Controls the underline text decoration of the control's subtitle. |
| Title | String | (None) | Text displayed as the title. |
| TitleAlignment | TextAlignments | (None) | Alignment of the title text. |
| TitleBold | Boolean | (None) | Controls the font weight of the title. |
| TitleColor | ColorGroup | (None) | Color used to draw the control's title. |
| TitleFontName | String | (None) | Font face used to draw the control's title. |
| TitleFontSize | Integer | (None) | Font size used to draw the control's title. |
| TitleItalic | Boolean | (None) | Controls the obliqueness of the control's title text. |
| TitleUnderline | Boolean | (None) | Controls the underline text decoration of the control's title. |
| ValueType | ValueTypes | (None) | Controls the icon type used to denote positive item values. |