# GraffitiMenuItem
Class
## About
GraffitiMenuItem is designed to provide a popup menu-like replacement for DesktopMenuItem in the mobile experience. On small form factor devices, the menu will be shown as a sheet window, and on large devices it will appear as a popover.
## Preview
## Delegates
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ItemSelectedDelegate | item as GraffitiMenuItem | (None) | Delegate definition called when the selection has changed. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ItemSelected | item as GraffitiMenuItem | (None) | Raised when an item has been selected. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Add | item as GraffitiMenuItem | (None) | Adds a new item. |
| AddAt | index as Integer <br> item as GraffitiMenuItem | (None) | Adds a new item at the specified index. |
| Constructor | (None) | (None) | Creates a new instance of the class. |
| Attributes | Hidden | Constructor | |
| Constructor | text as String | (None) | Creates a new instance of the class. |
| Attributes | Hidden | destroy | |
| IndexOf | item as GraffitiMenuItem | Integer | Returns the index of the specified item. |
| ItemAt | index as Integer | GraffitiMenuItem | Returns the item at the specified index. |
| LastIndex | (None) | Integer | Returns the last index of the items array. |
| ParentItem | (None) | GraffitiMenuItem | Returns the parent GraffitiMenuItem of this instance. |
| Attributes | Hidden | raiseSelected | |
| Remove | item as GraffitiMenuItem | (None) | Removes the specified item. |
| RemoveAll | (None) | (None) | Removes all items from the component. |
| RemoveAt | index as Integer | (None) | Removes the item at the specified index. |
| ShowAt | screen as MobileScreen <br> location as Point | (None) | Shows the menu at the specified location on the provided screen. |
| ShowOn | button as MobileToolbarButton | (None) | Shows the menu at the specified MobileToolbarButton. |
| ShowOn | control as MobileUIControl | (None) | Shows the menu at the specified MobileToolbarButton. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Attributes | items | Nil | |
| Attributes | mParent | WeakRef | |
| Attributes | onSelected | ItemSelectedDelegate | |
| BackItemText | String | "Back" | Text displayed in the item that allows backward traversal in the menu system. |
| Checked | Boolean | Nil | Item will be checked when True. |
| DetailText | String | Nil | String displayed below the Text of the item in the menu. |
| HasSearch | Boolean | True | Control the visibility and functionality of the built-in search functionality. |
| Image | Picture | Nil | Image displayed in the item's cell on the menu's view. |
| Tag | Variant | Nil | Developer storage. |
| Text | String | Nil | String displayed in the menu. |