ValueList

The ValueList control provides a list style selector of named values. It is useful for selecting flag values. The selected value can be set by the user or by a connected device. The ValueList control can send a message to a connected device whenever the selection changes. Its run-time properties can be referenced in command messages.

Use the collection editor on the NamedValues property to set the values in the list. Each value is an unsigned, 32-bit number.

Value list collection editor

Edit the values in the list using the NamedValues collection editor

Design-time Properties for the ValueList control
PropertyDescription
NamedValuesThe collection of named values that the user can select from
DefaultSelectionIndex of the item that should be selected initially
SelectionModeControls whether the user can select 1, many or no items from the list.
IntegralHeightWhen true, the value list height is adjusted so only complete items are shown in the list
HorizontalScrollBarA horizontal scrollbar is shown when true so the user can scroll to see items wider than the list
ScrollAlwaysVisibleWhen true, scroll bars are always shown regardless of the number of items in the list
Run-time properties for the ValueList control
NameAccessTypeDescription
NameRead onlystringThe name of the control
SelectedIndexRead/writeintThe row number of the selected item (starting from 0). Only supported when SelectionMode is One
SelectedNameRead/writeintThe name of the selected item. Only supported when SelectionMode is One
ValueRead/writeUInt32The selected value. If multiple values are selected, calculates a bit-wise or for all selected items
Run-time properties common to most controls
PropertyAccessTypeDescription
VisibleRead/writeboolHide/show the control
EnabledRead/writeboolEnable/disable the control. When a control is disabled it is visible but shown grayed out and you can't interact with it.
ForeColorRead/writestringAdjust the foreground color
BackColorRead/writestringAdjust the background color
Recent Posts

Leave a Comment

Start typing and press Enter to search