Zero-Selections and Single Choice List Gadgets
- Last UpdatedNov 14, 2022
- 1 minute read
You can also define a single-choice list-gadget to allow zero-selections..
The list syntax allows you to define the gadget with the SINGLE ZEROSELECTIONS keyword to indicate that the list is single choice with no mandatory selected field, e.g.
list .List |Cars| Anchor all single zerosel width 25 length 10
The val member now allows programmatic de-selection of the current field.
For Single choice lists the keyword NORESELECT disables UnSelect and Select events when the currently selected field is clicked with the mouse, for example:
list .l1 |List gadget| zeroSel noReselect width 15 length 5 tooltip 'single choice list'
For ZeroSelection lists it is now possible to interactively deselect the selected field by clicking in unused rows or after the last column.
Single choice List gadgets support UNSELECT events. Typically when a field is selected, an UNSELECT event is raised for the previously selected field (if any) and then a SELECT event is raised for the new field. An UNSELECT event is raised whenever a selected field is interactively deselected.