ListBox

Logical widget that presents a field as a permanently open list of possible values, of which one or more can be selected.

Listbox in Chrome
DSP Listbox widget in Chrome

Widget Summary
Logical widget name: ListBox
Maps to physical widget: htmlselect
Default definition: htmlselect(html:size=3)
Supported triggers and properties: See htmlselect.
Use for: String fields with ValRep list.

Description

A list box is a field that is displayed as a permanently open list. The user can select one or more of the items in the list. If there are more items in the list than can be visible at the same time, Uniface adds a scroll bar on the right-hand side of the list box.

The user cannot add new items to the list. Entering a character in the field causes Uniface to scroll the list to the next item that starts with that letter.

The user can select more than one value only if the field contains sub-fields, and these are enabled by the syntax model; otherwise, choosing one value from the list implies that all other values in the list have not been chosen.

ValRep Handling

The widget uses the ValRep list defined for the field to build up the options visible in the list. It expects a list of Value=Representation pairs and displays the representations in the list. If a ValRep item does not have a Representation, the Value is displayed instead. When the user selects an item in the list, the corresponding value is selected.

If you want to define an empty string value as one of the items in the list, enter a representation without a corresponding value. You can test for empty string values by testing for an empty string ("").

For more information, see ValRep.

Related Topics