# 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 |
| --- | :---: | :---: | --- |
| Sub | Add | (None) | Adds the specified item to the control. |
| Sub | AddAt | (None) | Adds the specified item at the supplied index. |
| Sub | DeselectAll | (None) | Deselects all currently selected items. |
| Sub | DeselectItem | (None) | Deselects the specified item. |
| Function | IndexOf | As | Returns the index of the item within the internal items array, or -1 when not found. |
| Sub | Invalidate | (None) | Signals the control to redraw the specified item. |
| Sub | InvalidateAll | (None) | Signals the control that all items must be redrawn. |
| Function | ItemAt | As | Returns the item as the specified index within the internal items array, or Nil when not found. |
| Function | ItemFromPoint | As | Returns the item at the given point within its display. |
| Function | ItemFromXY | As | Returns the item at the given point within its display. |
| Function | LastIndex | As | The index of the last item within the internal items array. |
| Sub | Remove | (None) | Removes the specified item. |
| Sub | RemoveAll | (None) | Removes all items from the control. |
| Sub | RemoveAt | (None) | Removes the item at the specified index. |
| Sub | ScrollTo | (None) | Scrolls the display to the specified item. |
| Sub | SelectAll | (None) | Sets all items' values to True. |
| Function | SelectedItem | As | Returns the first selected item. |
| Function | SelectedItems | As | Returns an array of all selected items. |
| Function | SelectedItemText | As | Returns the text of the first selected item. |
| Sub | SelectItem | (None) | Selects the specified item. |
| Sub | ToggleSelection | (None) | Toggles all item values. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AllowDeselectOnSingle | Boolean | Nil | When True and SelectionMode = Single, the selected item can be deselected by the user. |
| AutoHeight | Boolean | Nil | When True, the control will adapt its height to fit its contents |
| BackgroundColor | ColorGroup | Nil | Color drawn to the background of the control. |
| BorderColor | ColorGroup | Nil | Color used to draw the control's border. |
| BorderRadius | Double | Nil | Control's border radius. |
| BorderSize | Double | Nil | Size of the control's border. |
| HasBackgroundColor | Boolean | Nil | Controls drawing of the control's background. |
| ItemBackgroundColor | ColorGroup | Nil | Color used to draw items' background. |
| ItemBackgroundColorHover | ColorGroup | Nil | Color used to draw items' background when hovered. |
| ItemBackgroundColorSelected | ColorGroup | Nil | Color used to draw items' background when selected. |
| ItemBorderColor | ColorGroup | Nil | Color used to draw items' border. |
| ItemBorderColorHover | ColorGroup | Nil | Color used to draw items' border when hovered. |
| ItemBorderColorSelected | ColorGroup | Nil | Color used to draw items' border when selected. |
| ItemBorderRadius | Integer | Nil | Radius of items' corners. |
| ItemBorderSize | Double | Nil | Size of items' border. |
| ItemFontName | String | Nil | Font face used for drawing items' text. |
| ItemFontSize | Integer | Nil | Font size used for drawing items' text. |
| ItemTextColor | ColorGroup | Nil | Color used for drawing items' text. |
| ItemTextColorHover | ColorGroup | Nil | Color used for drawing items' text when hovered. |
| ItemTextColorSelected | ColorGroup | Nil | Color used for drawing items' text when selected. |
| ItemValueColorHover | ColorGroup | Nil | Color used for drawing items' value icon when hovered. |
| ItemValueColorSelected | ColorGroup | Nil | Color used for drawing items' value icon when selected. |
| MaximumHeight | Integer | Nil | Maximum height of control when AutoHeight = True. |
| Private | As | Nil | |
| Private | | GraffitiSelectGroupItem | |
| Private | As | = | |
| 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 | = | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | = | |
| 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 | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| 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 | = | |
| Private | As | Nil | |
| SelectionMode | SelectionModes | Nil | Determines the control's selection mode operation. |
| Subtitle | String | Nil | Text displayed as the subtitle. |
| SubtitleAlignment | TextAlignments | Nil | Alignment of the subtitle text. |
| SubtitleBold | Boolean | Nil | Controls the font weight of the subtitle. |
| SubtitleColor | ColorGroup | Nil | Color used to draw the control's subtitle. |
| SubtitleFontName | String | Nil | Font face used to draw the control's subtitle. |
| SubtitleFontSize | Integer | Nil | Font size used to draw the control's subtitle. |
| SubtitleItalic | Boolean | Nil | Controls the obliqueness of the control's subtitle text. |
| SubtitleUnderline | Boolean | Nil | Controls the underline text decoration of the control's subtitle. |
| Title | String | Nil | Text displayed as the title. |
| TitleAlignment | TextAlignments | Nil | Alignment of the title text. |
| TitleBold | Boolean | Nil | Controls the font weight of the title. |
| TitleColor | ColorGroup | Nil | Color used to draw the control's title. |
| TitleFontName | String | Nil | Font face used to draw the control's title. |
| TitleFontSize | Integer | Nil | Font size used to draw the control's title. |
| TitleItalic | Boolean | Nil | Controls the obliqueness of the control's title text. |
| TitleUnderline | Boolean | Nil | Controls the underline text decoration of the control's title. |
| ValueType | ValueTypes | Nil | Controls the icon type used to denote positive item values. |