list view (to display collections of items)

 Item 1 
 Item 2 
 Item 3 

Constructor

new (renderer:T ‑> Widget, ?listener:T ‑> Void, ?relativeWidth:Float, ?align:Int)

Parameters:

renderer

how to display an item

listener

what to do with the clicked item; defaults to null

relativeWidth

the widget relative width; defaults to 1

align

the widgets alignement (-1=left, 0=centered, 1=right); defaults to 0

Throws:

String

if relativeWidth not in [0..1] or if align not in [-1, 0, 1]

Variables

source:Iterable<T>

the ListView data source (Array or List)

Methods

push (item:T):ListView<T>

adds an item to the data source

Parameters:

item

the item to add / display

Throws:

String

if source is not an Array nor a List (null for example)

Returns:

the ListView instance

Inherited Variables

Inherited Methods