singleChoiceList

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

Creates a List control that is bound to a Field. This controls lets a user select a single option from a list. This is behaves like radioList.

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 singleChoiceList(progression: IntProgression, itemVisualizer: ItemVisualizer<Int, IndexedItem> = toString(StringVisualizer()), fitContents: Set<Dimension> = setOf(Height), config: (List<Int, *>) -> Unit = {}): FieldVisualizer<Int>(source)

Creates a List control that is bound to a Field. This controls lets a user select a single option from a list.

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