Skip to content

CheckBoxList

Steve Hannah edited this page Jul 8, 2021 · 1 revision

CheckBoxList

<checkBoxList>javadoc

Synopsis

A group of checkboxes using a ListModel for the options.

Usage

<checkBoxList model="..."/>

Attributes

All mutable properties of the CheckBoxList class have a corresponding attribute. In addition, the following XML attributes are available. See javadoc.

Tip
The model attribute is required, as it supplies the list model that is used to populate the list of checkboxes.
buttonUiid

The style to use for the individual CheckBoxes.

model

The MultipleSelectionListModel to use as the list model for this list. You can supplie a list of strings using the "csv:" prefix, and it will automatically convert them into an appropriate model. You can also use the EntityList.toMultipleSelectionListModel() to convert an entity list into a view model.

toggle

true|false. Sets the checkbox to be a toggle button instead of a checkbox.

Example 1: A simple checkbox list

<checkBoxList model="csv:Red, Green, Blue"/>

CheckBoxList

Example 2: Toggle Buttons

<checkBoxList toggle="true" model="csv:Red, Green, Blue"/>
CheckBoxList toggle

Example 3: Toggle Buttons with Custom UIIDs

<checkBoxList toggle="true"
    buttonUiid="MyToggleButton"
    model="csv:Red, Green, Blue"
/>
theme.css
MyToggleButton {
    cn1-derive: Button;
    margin: 1mm;
    background-color: #cccccc;
    border-radius: 2mm;
    padding: 0.5rem;
    border: 1px solid gray;
    color: gray;
}

MyToggleButton.pressed {
    background-color: blue;
    color: white;
}
CheckBoxList buttonUiid

See Also

  1. RADButtonList - Can be used to bind the <checkboxList> to a view property.

  2. CheckBoxList javadoc

Clone this wiki locally