ListView

fun <T> ListView(    posX: Number = 0,     posY: Number = 0,     width: Number = DEFAULT_LIST_VIEW_WIDTH,     height: Number = DEFAULT_LIST_VIEW_HEIGHT,     items: List<T> = emptyList(),     font: Font = Font(),     visual: Visual = ColorVisual.WHITE,     orientation: Orientation = Orientation.VERTICAL,     selectionMode: SelectionMode = SelectionMode.SINGLE,     selectionBackground: ColorVisual = ColorVisual.BLUE,     formatFunction: (T) -> String? = null)

Creates a ListView.

Parameters

T

Generic ListView content.

posX

Horizontal coordinate for this ListView. Default: 0.

posY

Vertical coordinate for this ListView. Default: 0.

width

Width for this ListView. Default: DEFAULT_LIST_VIEW_WIDTH.

height

Height for this ListView. Default: DEFAULT_LIST_VIEW_HEIGHT.

items

Initial list of items for this ListView. Default: empty list.

font

Font to be used for this ListView. Default: default Font constructor.

visual

Background Visual. Default: ColorVisual.WHITE.

orientation

Orientation for this ListView. Default: Orientation.VERTICAL.

selectionMode

Selection mode to be used for this ListView. Default: SelectionMode.SINGLE.

selectionBackground

Background for selected items in this ListView. Default: ColorVisual.BLUE.

formatFunction

The formatFunction that is used to represent the items. Default: null.