# GraffitiDrillMenu
Class Inherits GraffitiSuite.BaseCanvas
## About
GraffitiDrillMenu is a beautiful, animated alternative to tree-style UI components.
Features:
*
Animated traversal
*
Infinite number of levels
*
Per-item notification counts
*
Global custom styling properties
*
Per-item custom styling properties
## Preview


Previous
Next
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Attributes
| Name | Value |
| --- | --- |
| DefaultEvent | "ItemClick" |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ContextClick | (None) | (None) | Triggered when the user right-clicks. |
| DrawBackBackground | g as Graphics <br> Hover as Boolean | Boolean | Raised when the background of the Back is being drawn. |
| DrawBackExpandWidget | g as Graphics <br> bounds as Xojo.Rect <br> Hover as Boolean | Boolean | Raised when the Back expand icon is being drawn. |
| DrawBackText | g as Graphics <br> byRef bounds as Xojo.Rect <br> Hover as Boolean | Boolean | Raised when the text of the Back item is being drawn. |
| DrawItemBackground | g as Graphics <br> item as GraffitiDrillMenuItem <br> Hover as Boolean | Boolean | Raise when drawing the background of an item. |
| DrawItemExpandWidget | g as graphics <br> item as GraffitiDrillMenuItem <br> bounds as Xojo.Rect <br> Hover as Boolean | Boolean | Raised when drawing the expand icon of an item. |
| DrawItemIcon | g as graphics <br> item as GraffitiDrillMenuItem <br> bounds as Xojo.Rect <br> Hover as Boolean | Boolean | Raised when draw the icon of an item. |
| DrawItemNotification | g as Graphics <br> item as GraffitiDrillMenuItem <br> Hover as Boolean | Boolean | Raise when drawing the Notification area of an item. |
| DrawItemText | g as Graphics <br> item as GraffitiDrillMenuItem <br> bounds as Xojo.Rect <br> Hover as Boolean | Boolean | Raised when drawing the text of an item. |
| ItemClick | item as GraffitiDrillMenuItem | (None) | Raise when the user clicks an item. |
| ItemContextClick | item as GraffitiDrillMenuItem | (None) | Raised when the user context clicks and item. |
| ItemDoubleClick | item as GraffitiDrillMenuItem | (None) | Raised when the user double-clicks and item. |
| ItemExpand | item as GraffitiDrillMenuItem | Boolean | Triggered when an item is expanded (or, more appropriately, when thee display shifts to display an item's children). |
| Opening | (None) | (None) | |
| ScrollChange | (None) | (None) | Raised when the display has been scrolled. |
| ViewChange | item as GraffitiDrillMenuItem | (None) | Raised when the display is changed to display a different set of items. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | AddItem | (None) | Adds a new top-level item. |
| Function | getItemIndex | As | Returns the index of the specified item. |
| Sub | InsertItem | (None) | Inserts the provided item at the specified index. |
| Function | Item | As | Returns the item at the specified index. |
| Function | ItemCount | As | Returns the number of top-level items currently added to the control. |
| Sub | RemoveAll | (None) | Removes all top-level items. |
| Sub | RemoveItem | (None) | Removes the item at the specified index. |
| Sub | ScrollTo | (None) | Scrolls to the specified item. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Animated | Boolean | Nil | When True the display will animate while switching. |
| Attributes | Items | Nil | |
| BackItemText | String | Nil | Text used in the Back item at the top of sub-item views. |
| BackItemTextBold | Boolean | Nil | Font weight of Back item text. |
| BackItemTextBoldHover | Boolean | Nil | Font weight of the back item's text when hovered. |
| BackItemTextColor | Color | Nil | Color used to draw Back item text. |
| BackItemTextColorHover | Color | Nil | Text color of the back item when hovered. |
| BackItemTextFont | String | Nil | Font face of Back item text. |
| BackItemTextFontHover | String | Nil | Font of the back item text when hovered. |
| BackItemTextItalic | Boolean | Nil | When True, Back item text is italicized. |
| BackItemTextItalicHover | Boolean | Nil | Obliqueness of the back item text when hovered. |
| BackItemTextSize | Integer | Nil | Text size of Back item. |
| BackItemTextSizeHover | Integer | Nil | Size of the back item text when hovered. |
| BackItemTextUnderline | Boolean | Nil | Controls the underline decoration of the back item text. |
| BackItemTextUnderlineHover | Boolean | Nil | Controls the underline decoration of the back item text on hover. |
| BGColor | Color | Nil | Background color of component display. |
| BorderColor | Color | Nil | Border color of component display. |
| BorderRadius | Integer | Nil | Corner radius of component display. |
| CurrentView | GraffitiDrillMenuItem | Nil | Current item being viewed. Nil for top-level. |
| CustomColors | Boolean | Nil | When True, custom color properties will be applied to drawing. |
| ExpandOnDoubleClick | Boolean | False | When True, component will only change view when the user double-clicks an item with children. |
| ItemBGColor | Color | Nil | Background color of items. |
| ItemBGColorHover | Color | Nil | Item background color when hovered. |
| ItemBGColorSelected | Color | Nil | Item background color when selected. |
| ItemBorderColor | Color | Nil | Border color of items. |
| ItemBorderColorHover | Color | Nil | Item border color when hovered. |
| ItemBorderColorSelected | Color | Nil | Item border color when selected. |
| LockUpdate | Boolean | Nil | Set to True when populating large amounts of items to defer drawing until you then set LockUpdate to False. |
| NotificationBGColor | Color | Nil | Background color of notification areas. |
| NotificationBGColorHover | Color | Nil | Notification badge background color when hovered. |
| NotificationBGColorSelected | Color | Nil | Notification badge background color when selected. |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| 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 | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| 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 | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| 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 | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| 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 | 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 | | GraffitiDrillMenuItem | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| ReverseDragScrollDirection | Boolean | False | Controls the scroll direction when dragging. |
| RowHeight | Integer | Nil | Height of each row. |
| ScrollOnDrag | Boolean | True | When True, the display can be scrolled by dragging with the cursor. |
| SelectedItem | GraffitiDrillMenuItem | Nil | The currently selected item. |
| TextBold | Boolean | Nil | Font weight of items. |
| TextBoldHover | Boolean | Nil | Item text weight when hovered. |
| TextBoldSelected | Boolean | Nil | Item text weight when selected. |
| TextColor | Color | Nil | Color of item text. |
| TextColorHover | Color | Nil | Item text color when hovered. |
| TextColorSelected | Color | Nil | Item text color when selected. |
| TextFont | String | Nil | Font face of items. |
| TextFontHover | String | Nil | Item text font when hovered. |
| TextFontSelected | String | Nil | Item text font when selected. |
| TextItalic | Boolean | Nil | When True, item text will be italicized. |
| TextItalicHover | Boolean | Nil | Obliqueness of item text when hovered. |
| TextItalicSelected | Boolean | Nil | Obliqueness of item text when selected. |
| TextSize | Integer | Nil | Font size applied to item text. |
| TextSizeHover | Integer | Nil | Item text size when hovered. |
| TextSizeSelected | Integer | Nil | Item text size when selected. |
| TextUnderline | Boolean | Nil | When True, item text will be underlined. |
| TextUnderlineHover | Boolean | Nil | Item text decoration when hovered. |
| TextUnderlineSelected | Boolean | Nil | Item text decoration when selected. |