# GraffitiListbox
Container Inherits DesktopContainer
## About
GraffitiListbox is a replacement for the standard Xojo listbox that uses GraffitiColors to properly draw list contents, supports cell border variants, cell alignments, advanced modern header with support for drop-down menus, and much more! Looks great on macOS, Windows, or Linux!
## Preview

Previous
Next
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Borders | None <br> ThinDotted <br> ThinSolid <br> ThickSolid <br> DoubleThinSolid | Possible border styles. |
| HoverEffects | System <br> On <br> Off | Possible row hover effects. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| CellAction | Row as Integer <br> Column as Integer | (None) | If a cell is editable, a CellAction event occurs when the user finishes editing a cell. Row and Column are zero-based. |
| CellBackgroundPaint | g as Graphics <br> Row as Integer <br> Column as Integer | Boolean | Raised when a cell's background is being drawn. |
| CellClick | Row as Integer <br> Column as Integer <br> X as Integer <br> Y as Integer | Boolean | Raised when the user clicks a cell. |
| CellGotFocus | Row as Integer <br> Column as Integer | (None) | The user has selected an editable cell of a ListBox. Row and Column are zero-based. |
| CellKeyDown | row as Integer <br> column as Integer <br> key as String | Boolean | The user has pressed a key while a cell in the ListBox is being edited. Row and Column are zero-based. |
| CellLostFocus | row as Integer <br> column as Integer | (None) | An editable cell has lost focus. |
| CellTextChange | Row as Integer <br> Column as Integer | (None) | The user has changed the text in an editable cell. |
| CellTextPaint | g as Graphics <br> Row as Integer <br> Column as Integer <br> x as Integer <br> y as Integer | Boolean | Raise before text is drawn to cells, allowing modifcation. |
| Change | (None) | (None) | The user has selected a row. |
| CollapseRow | Row as Integer | (None) | The user has collapsed a hierarchical row. |
| ColumnResized | column as Integer | (None) | Raised when a column resize operation has completed. |
| ColumnResizing | column as Integer | (None) | Raised during a column resize operation. |
| CompareRows | Row1 as Integer <br> Row2 as Integer <br> Column as Integer <br> ByRef Result as Integer | Boolean | Compare rows for sort operations. |
| ConstructContextualMenu | Base As DesktopMenuItem <br> x As Integer <br> y As Integer | Boolean | |
| ContextualMenuItemSelected | selectedItem as DesktopMenuItem | Boolean | |
| DisclosureWidgetPaint | g As Graphics <br> row As Integer <br> ByRef x As Integer <br> ByRef y As Integer <br> ByRef width As Integer <br> ByRef height As Integer | Boolean | The hierarchical expand/collapse icon is being drawn. |
| DoubleClick | (None) | (None) | The user has double-clicked a row or cell. |
| DragEnter | obj as DragItem <br> Action as DragItem.Types | Boolean | Fires when the passed DragItem enters the RectControl. |
| DragExit | obj as DragItem <br> Action as DragItem.Types | (None) | Raised when the dragged item has left the display area. |
| DragOver | x as Integer <br> y as Integer <br> obj as DragItem <br> Action as DragItem.Types | Boolean | Raised when a DragItem is being dragged inside the display. |
| DragOverRow | x As Integer <br> y As Integer <br> obj As DragItem <br> action As DragItem.Types <br> ByRef row As Integer <br> ByRef parentRow As Integer <br> ByRef location As Desktoplistbox.DropLocations | Boolean | Raised when a DragItem is being dragged over rows. |
| DragReorderRows | newPosition As Integer <br> parentRow As Integer | Boolean | Raised when a row has been dragged to a new position. |
| DragRow | Drag as DragItem <br> Row as Integer | Boolean | Raised when a row drag operation has begun. |
| DropObject | Obj as DragItem <br> Action as DragItem.Types | (None) | Raised when a DragItem has been dropped on the control. |
| DropObjectOnRow | x As Integer <br> y As Integer <br> obj As DragItem <br> action As DragItem.Types <br> row As Integer <br> parentRow As Integer <br> location As Desktoplistbox.DropLocations | (None) | Raised when a DragItem has been dropped on a row. |
| EnableMenuItems | (None) | (None) | The control has received the focus. Menu handlers are invoked if the control has the focus. |
| ExpandRow | Row as Integer | (None) | Raised when the user has expanded a hierarchical row. |
| GotFocus | (None) | (None) | Raised when the control has received focus. |
| HeaderBackgroundPaint | g as Graphics <br> column as Integer | Boolean | A column header is being redrawn. Return True to override default drawing. |
| HeaderContentPaint | g as Graphics <br> column as Integer | Boolean | A column header's text is being redrawn. Return True to override default drawing. |
| HeaderMenuAction | column as Integer <br> parentMenu as DesktopMenuItem <br> selectedItem as DesktopMenuItem | (None) | Raised when the user clicks a column header's menu item. |
| HeaderMouseEnter | column as Integer | (None) | Raised when the user's cursor enters a header's area. |
| HeaderMouseExit | column as Integer | (None) | Raised when the user's cursor enter's a header's area. |
| HeaderPressed | Column as Integer <br> IsContextualClick as Boolean | Boolean | Raised when the user clicks a column header. |
| KeyDown | Key as String | Boolean | Raised when the control has focus and a keyboard key is pressed. Return True to cancel default behavior and raise KeyUp on release. |
| KeyUp | Key As String | (None) | Raised when the user releases a pressed key while the control has focus. |
| LostFocus | (None) | (None) | Raised when the control has lost focus. |
| MouseDown | x as Integer <br> y as Integer | Boolean | Raise when the user clicks the control. Return True to cancel default operation and raise MouseUp. |
| MouseDrag | x as Integer <br> y as Integer | (None) | Raised when a drag operation is occurring. |
| MouseEnter | (None) | (None) | Raised when the mouse enters the control's area. |
| MouseExit | (None) | (None) | Raised when the mouse exits the control's area. |
| MouseMove | X as Integer <br> Y as Integer | (None) | Raised when the mouse is moved within the control's area. |
| MouseUp | x As Integer <br> y As Integer | (None) | Raised when the pressed mouse button is released. |
| MouseWheel | X as Integer <br> Y as Integer <br> DeltaX as Integer <br> DeltaY as Integer | Boolean | Raised when the user has used the mouse wheel. Return True to cancel scrolling. |
| Opening | (None) | (None) | |
| SortColumn | Column as Integer | Boolean | Raised when the user has clicked a column header in an attempt to sort the row values. Return True to cancel sort operation. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | AcceptFileDrop | (None) | |
| Sub | AcceptPictureDrop | (None) | |
| Sub | AcceptRawDataDrop | (None) | |
| Sub | AcceptTextDrop | (None) | |
| Sub | AddFolder | (None) | |
| Sub | AddRow | (None) | |
| Sub | AddRow | (None) | |
| Function | Cell | As | |
| Sub | Cell | (None) | |
| Function | CellAlignment | As | |
| Sub | CellAlignment | (None) | |
| Function | CellAlignmentOffset | As | |
| Sub | CellAlignmentOffset | (None) | |
| Function | CellBackgroundColor | As | |
| Sub | CellBackgroundColor | (None) | |
| Function | CellBold | As | |
| Sub | CellBold | (None) | |
| Function | CellBorderBottom | As | |
| Sub | CellBorderBottom | (None) | |
| Function | CellBorderColor | As | |
| Sub | CellBorderColor | (None) | |
| Function | CellBorderLeft | As | |
| Sub | CellBorderLeft | (None) | |
| Function | CellBorderRight | As | |
| Sub | CellBorderRight | (None) | |
| Function | CellBorderTop | As | |
| Sub | CellBorderTop | (None) | |
| Function | CellBounds | As | |
| Function | CellCheck | As | |
| Sub | CellCheck | (None) | |
| Sub | CellClearBackgroundColor | (None) | |
| Sub | CellClearTextColor | (None) | |
| Function | CellHasBackgroundColor | As | |
| Function | CellHasTextColor | As | |
| Function | CellHelpTag | As | |
| Sub | CellHelpTag | (None) | |
| Function | CellItalic | As | |
| Sub | CellItalic | (None) | |
| Function | CellState | As | |
| Sub | CellState | (None) | |
| Function | CellTag | As | |
| Sub | CellTag | (None) | |
| Function | CellTextColor | As | |
| Sub | CellTextColor | (None) | |
| Function | CellType | As | |
| Sub | CellType | (None) | |
| Function | CellUnderline | As | |
| Sub | CellUnderline | (None) | |
| Function | Column | As | |
| Sub | Column | (None) | |
| Function | ColumnAlignment | As | |
| Sub | ColumnAlignment | (None) | |
| Function | ColumnAlignmentOffset | As | |
| Sub | ColumnAlignmentOffset | (None) | |
| Function | ColumnCount | As | |
| Sub | ColumnCount | (None) | |
| Function | ColumnFromXY | As | |
| Function | ColumnIsHovered | As | |
| Function | ColumnSortable | As | |
| Sub | ColumnSortable | (None) | |
| Function | ColumnSortDirection | As | |
| Sub | ColumnSortDirection | (None) | |
| Function | ColumnTag | As | |
| Sub | ColumnTag | (None) | |
| Function | ColumnType | As | |
| Sub | ColumnType | (None) | |
| Sub | DeleteAllRows | (None) | |
| Sub | EditCell | (None) | |
| Function | Expanded | As | |
| Sub | Expanded | (None) | |
| Function | HeaderAlignmentAt | As | |
| Sub | HeaderAlignmentAt | (None) | |
| Function | HeaderBackgroundColorAt | As | |
| Sub | HeaderBackgroundColorAt | (None) | |
| Sub | HeaderBackgroundColorClearAt | (None) | |
| Function | HeaderBackgroundColorHoverAt | As | |
| Sub | HeaderBackgroundColorHoverAt | (None) | |
| Sub | HeaderBackgroundColorHoverClearAt | (None) | |
| Function | HeaderBackgroundColorHoverSetAt | As | |
| Function | HeaderBackgroundColorSetAt | As | |
| Function | HeaderBoldAt | As | |
| Sub | HeaderBoldAt | (None) | |
| Function | HeaderBoldSetAt | As | |
| Function | HeaderItalicAt | As | |
| Sub | HeaderItalicAt | (None) | |
| Function | HeaderItalicSetAt | As | |
| Function | HeaderMenu | As | |
| Sub | HeaderMenu | (None) | |
| Function | HeaderTextColorAt | As | |
| Sub | HeaderTextColorAt | (None) | |
| Sub | HeaderTextColorClearAt | (None) | |
| Function | HeaderTextColorHoverAt | As | |
| Sub | HeaderTextColorHoverAt | (None) | |
| Sub | HeaderTextColorHoverClearAt | (None) | |
| Function | HeaderTextColorHoverSetAt | As | |
| Function | HeaderTextColorSetAt | As | |
| Function | HeaderType | As | |
| Sub | HeaderType | (None) | |
| Function | HeaderUnderlineAt | As | |
| Sub | HeaderUnderlineAt | (None) | |
| Function | HeaderUnderlineSetAt | As | |
| Function | Heading | As | |
| Sub | Heading | (None) | |
| Sub | InsertFolder | (None) | |
| Sub | InsertRow | (None) | |
| Sub | InvalidateCell | (None) | |
| Function | List | As | |
| Sub | List | (None) | |
| Sub | LockUpdate | (None) | |
| Sub | PressHeader | (None) | |
| Sub | RemoveRow | (None) | |
| Function | RowDepth | As | |
| Function | RowFromXY | As | |
| Function | RowIsFolder | As | |
| Function | RowPicture | As | |
| Sub | RowPicture | (None) | |
| Function | RowTag | As | |
| Sub | RowTag | (None) | |
| Function | Selected | As | |
| Sub | Selected | (None) | |
| Sub | SetFocus | (None) | |
| Sub | Sort | (None) | |
| Function | Text | As | |
| Sub | Text | (None) | |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| ActiveCell | DesktopTextControl | Nil | |
| AlternateRowColors | Boolean | Nil | |
| AutoHideScrollBars | Boolean | Nil | |
| Bold | Boolean | Nil | |
| BoldHeader | Boolean | Nil | |
| Border | Boolean | Nil | |
| ColumnCount | Integer | Nil | |
| ColumnsResizable | Boolean | Nil | |
| ColumnWidths | String | Nil | |
| DefaultRowHeight | Integer | Nil | |
| EnableDrag | Boolean | Nil | |
| EnableDragReorder | Boolean | Nil | |
| GridLines | DesktopListBox.GridLineStyles | Nil | |
| HasHeading | Boolean | Nil | |
| HeaderChange | Boolean | Nil | |
| HeaderHeight | Integer | Nil | |
| HeadingIndex | Integer | Nil | |
| Hierarchical | Boolean | Nil | |
| HoverEffect | HoverEffects | Nil | |
| InitialValue | String | Nil | |
| IsHorizontalScrollVisible | Boolean | Nil | |
| IsVerticalScrollVisible | Boolean | Nil | |
| Italic | Boolean | Nil | |
| ItalicHeader | Boolean | Nil | |
| LastAddedIndex | Integer | Nil | |
| LastIndex | Integer | Nil | |
| ListCount | Integer | Nil | |
| ListIndex | Integer | Nil | |
| ListIndexHover | Integer | Nil | |
| Private | | Integer | |
| 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 | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| 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 | = | |
| 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 | Nil | |
| Private | As | Nil | |
| Private | | Boolean | |
| Private | | Dictionary | |
| Private | | String | |
| Private | | DesktopListBox.Alignments | |
| Private | | DesktopMenuItem | |
| Private | | Xojo.Rect | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| RequiresSelection | Boolean | Nil | |
| RowHeight | Integer | Nil | |
| ScrollbarHorizontal | Boolean | Nil | |
| ScrollbarVertical | Boolean | Nil | |
| ScrollPosition | Integer | Nil | |
| ScrollPositionX | Integer | Nil | |
| SelCount | Integer | Nil | |
| SelectionType | DesktopListBox.RowSelectionTypes | Nil | |
| ShowDropIndicator | Boolean | Nil | |
| SortedColumn | Integer | Nil | |
| TabStop | Boolean | Nil | |
| TextFont | String | Nil | |
| TextFontHeader | String | Nil | |
| TextSize | Integer | Nil | |
| TextSizeHeader | Integer | Nil | |
| TextUnit | FontUnits | Nil | |
| TextUnitHeader | REALbasic.FontUnits | Nil | |
| Underline | Boolean | Nil | |
| UnderlineHeader | Boolean | Nil | |