ListBox
The ListBox control allows the selection of multiple, contiguous or non-contiguous items in a list.
If the list is long and the availability of space on the form is an issue, you may prefer to use a ComboBox instead.
Properties
Key properties of ListBox include:
- AllowDrop. Determines whether a user can drag and drop data to the list.
- Items. The items bound to a field in a Dataset are displayed for selection in the ListBox.
- SelectionMode. Determines whether one or multiple selections can be made from the list.
Events
Events can be configured for the ListBox to specify the behaviour of the control. For example, an action can be configured to occur when a user clicks the List Box using the Click event property.
For information on configuring events and other components of the design using a script, see: Working with Scripts.
Adding a ListBox
When you add a ListBox control to a form, click the control properties to Edit Items...
This will open the String Collection Editor in which you can add items to your list - one item per line.
When your items are added as required, click OK to add the list box to your form.
Items can also be created by specifying a binding via the Use Data Bound Items option.
Information on the Properties and Events for the ListBox control can be found at the link to Microsoft® Documentation.