list

fun <T, M : ListModel<T>> list(model: M, itemVisualizer: ItemVisualizer<T, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<T, M>) -> Unit = {}): FieldVisualizer<List<T>>(source)

Creates a List control that is bound to a Field. This controls lets a user select multiple options from a list. This control lets a user ignore selection entirely, which would result in an empty list. It is similar to a checkList.

Parameters

T

is the type of the items in the bounded field

model

for the list

itemVisualizer

used to render items in the list

fitContents

signaling whether the list should scale with its contents

config

used to control the resulting component


fun <T> list(first: T, vararg rest: T, itemVisualizer: ItemVisualizer<T, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<T, *>) -> Unit = {}): FieldVisualizer<List<T>>(source)

Creates a List control that is bound to a Field. This controls lets a user select multiple options from a list. This control lets a user ignore selection entirely, which would result in an empty list. It is similar to a checkList.

Parameters

T

is the type of the items in the bounded field

first

item in the list

rest

of the items in the list

itemVisualizer

used to render items in the list

fitContents

signaling whether the list should scale with its contents

config

used to control the resulting component


fun list(progression: IntProgression, itemVisualizer: ItemVisualizer<Int, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<Int, *>) -> Unit = {}): FieldVisualizer<List<Int>>(source)

Creates a List control that is bound to a Field. This controls lets a user select multiple options from a list. This control lets a user ignore selection entirely, which would result in an empty list. It is similar to a checkList.

Parameters

progression

to use for values

itemVisualizer

used to render items in the list

fitContents

signaling whether the list should scale with its contents

config

used to control the resulting component