The Value Combo Box control provides a list of named values. It is similar to, but more compact than, the ValueList control. The selected value can be set by the user or by a connected device. The Value Combo Box can send a message to a connected device whenever the selection changes and can be updated by commands sent from your Arduino sketch.

Value combo box

Edit available options on the NamedValues property.

Value Combo Box control properties
Property Access Type Method Description
NamedValues Design-only Collection The collection of named values that the user can select from
DefaultSelection Design-only Integer Index of the item that should be selected initially
IntegralHeight Design-only bool When true, the value list height is adjusted automatically so that only complete items are shown in the list
OnSelectionChangedSend Design-only string Sets the command sent to a remote device when a new item is selected from the list
SelectedIndex Read/write int SetListIndex The row number of the selected item (starting from 0). Only supported when SelectionMode is One
SelectedName Read/write int SetListName The name of the selected item. Only supported when SelectionMode is One
ShowItemValue Design-only bool Set to true to display the value associated with each item; false to show only the value’s name
Value Read/write UInt32 SetListValue The selected value.

This control also supports all the common control properties. It also supports the following methods, which can be used when creating serial commands.

Value Combo Box control methods
Name Returns Description
ClearListOptions() void Removes all options from the list.
SetListOption(uint Value, string DisplayValue) void Sets the text displayed for a list value. If the value isn’t already in the list, it is added.

Start typing and press Enter to search