# GraffitiPopupMenu
Class Inherits GraffitiUIControl
## About
GraffitiPopupMenu is a beautiful, powerful class that allows developers to provide a means of selecting individual field data.
## Preview
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| False | True |
### Console
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
### iOS
| 32-Bit | 64-Bit |
| :---: | :---: |
| False | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| UIModalPresentationStyle | fullscreen = 0 <br > pageSheet <br > formSheet <br > currentContext <br > custom <br > overFullScreen <br > overCurrentContext <br > popover <br > none = -1 <br > automatic = -2 | (None) |
| UISheetPresentationControllerDetent | medium <br > large <br > medium_large | (None) |
## Constants
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| GraffitiSuiteVersion | String | 64 | (None) |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Closing | (None) | (None) | (None) |
| DrawValue | g as graphics <br> bounds as Xojo.Rect | Boolean | Raised before the value is drawn, allowing developers to completely alter the appearance of the row's data. Return True to override default drawing. |
| Opening | (None) | (None) | (None) |
| PerformSearch | searchText as String | GraffitiPopupMenuItem | Raised when a search is being performed. Helpful for implementing customized searches based on database records. |
| SelectionChanged | (None) | (None) | Raised when the SelectedItem has changed. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Add | item as GraffitiPopupMenuItem | (None) | Adds a new item to the control. |
| AddAt | index as Integer <br> item as GraffitiPopupMenuItem | (None) | Adds a new item to the control at the specified index. |
| IndexOf | item as GraffitiPopupMenuItem <br> inParent as GraffitiPopupMenuItem = nil | Integer | Returns the index of the specified item within the internal array. |
| ItemAt | index as Integer <br> inParent as GraffitiPopupMenuItem = nil | GraffitiPopupMenuItem | Returns the container at the specified index in the internal array. |
| LastIndex | (None) | Integer | Returns the last index of items in the internal array. |
| Remove | item as GraffitiPopupMenuItem | (None) | Removed the specified item and its associated item. |
| RemoveAll | (None) | (None) | Remove all currently added items. |
| RemoveAt | index as Integer | (None) | Removes the item at the specified index. |
| SearchItems | text as String | GraffitiPopupMenuItem | Returns items matching the search string using the same algorithm as the popup. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| BackgroundColor | ColorGroup | (None) | Color drawn to the background of the component. |
| BorderColor | ColorGroup | (None) | Color used to draw the component's border. |
| BorderRadius | Integer | (None) | Height and width of corner radius. |
| BorderSize | Integer | (None) | Pen size used to draw the component's border. |
| ClearButtonCaption | String | (None) | Text of the clear button on the popup. |
| ClearButtonVisible | Boolean | True | Determines whether the clear button is visible on the popup. |
| Enabled | Boolean | (None) | (None) |
| InitialValue | String | (None) | (None) |
| SearchFieldHint | String | "Search" | Text used as a hint within the search field on the popup. |
| SearchFieldVisible | Boolean | (None) | Controls visibility of the search button on the popup. |
| SelectedItem | GraffitiPopupMenuItem | (None) | Currently selected Item. |
| TextColor | ColorGroup | (None) | Color used for drawing selected item text. |
| ValueFont | Font | (None) | Font used for drawing the value of items within the component. |