ControlledListBox

@Composable
fun ControlledListBox(selectedRow: Int?, onSelectRow: (position: Int?) -> Unit, modifier: Modifier = Modifier, activateOnSingleClick: Boolean = true, adjustment: Adjustment? = null, showSeparators: Boolean = false, tabBehavior: ListTabBehavior = ListTabBehavior.ALL, onSelectAll: () -> Unit = {}, onUnselectAll: () -> Unit = {}, placeholder: @Composable () -> Unit = {}, content: @Composable () -> Unit)

Creates a controlled org.gnome.gtk.ListBox that can only have a one selected row.

Parameters

selectedRow

The index of the selected row.

onSelectRow

Callback triggered when a row is selected.

modifier

Compose Modifier for layout and styling.

activateOnSingleClick

Whether rows activate on single click.

adjustment

The adjustment used for vertical scrolling.

showSeparators

Whether the rows have separators between them.

tabBehavior

The behavior of Tab and Shift + Tab keys.

onSelectAll

Callback triggered when the shortcut for selecting everything is activated.

onUnselectAll

Callback triggered when the shortcut for unselecting everything is activated.

placeholder

Component shown when the list is empty.

content

The list of ListBoxRow.


@Composable
fun ControlledListBox(selectedRows: Set<Int>, onSelectRows: (positions: Set<Int>) -> Unit, modifier: Modifier = Modifier, activateOnSingleClick: Boolean = true, adjustment: Adjustment? = null, showSeparators: Boolean = false, tabBehavior: ListTabBehavior = ListTabBehavior.ALL, onSelectAll: () -> Unit = {}, onUnselectAll: () -> Unit = {}, placeholder: @Composable () -> Unit = {}, content: @Composable () -> Unit)

Creates a controlled org.gnome.gtk.ListBox that can have multiple selected rows.

Parameters

selectedRows

The indexes of the selected rows.

onSelectRows

Callback triggered when rows are selected.

modifier

Compose Modifier for layout and styling.

activateOnSingleClick

Whether rows activate on single click.

adjustment

The adjustment used for vertical scrolling.

showSeparators

Whether the rows have separators between them.

tabBehavior

The behavior of Tab and Shift + Tab keys.

onSelectAll

Callback triggered when the shortcut for selecting everything is activated.

onUnselectAll

Callback triggered when the shortcut for unselecting everything is activated.

placeholder

Component shown when the list is empty.

content

The list of ListBoxRow.


@Composable
fun ControlledListBox(modifier: Modifier = Modifier, activateOnSingleClick: Boolean = true, adjustment: Adjustment? = null, showSeparators: Boolean = false, tabBehavior: ListTabBehavior = ListTabBehavior.ALL, onSelectAll: () -> Unit = {}, onUnselectAll: () -> Unit = {}, placeholder: @Composable () -> Unit = {}, content: @Composable () -> Unit)

Creates a controlled org.gnome.gtk.ListBox that cannot have a selected row.

Parameters

modifier

Compose Modifier for layout and styling.

activateOnSingleClick

Whether rows activate on single click.

adjustment

The adjustment used for vertical scrolling.

showSeparators

Whether the rows have separators between them.

tabBehavior

The behavior of Tab and Shift + Tab keys.

onSelectAll

Callback triggered when the shortcut for selecting everything is activated.

onUnselectAll

Callback triggered when the shortcut for unselecting everything is activated.

placeholder

Component shown when the list is empty.

content

The list of ListBoxRow.