AListBoxes and AComboBoxes present a list of string items to the user. By default, the choices are displayed vertically in a single column. (AListBox supports multiple columns.) If the number of items exceeds what can be displayed in the AComboBox or AListBox, scroll bars automatically appear on the control. The user can then scroll up and down through the list, as shown below:
An AComboBox control combines the features of an ATextBox and an AListBox. This control allows the user to select either by typing text into the ComboBox or by selecting an item from its list, as shown below:
In contrast to some other controls that contain a single value; for example the label's Caption property or the ATextBox's Text property, AListBoxes and AComboBoxes contain multiple values or a collection of values. They have built-in methods for adding, removing and retrieving values from their collections at run time. To add several items to an AListBox named List1, the code would look like this:
List1.AddItem("Amp")
List1.AddItem("Hertz")
List1.AddItem("Meter")
Alternatively, you can pre-load an AListBox or AComboBox with values at design time, using the List tab of the Properties window for either control. You enter a term into the box marked List, and then press the Insert button to add the term as an item in the list. You can delete the term by clicking on it with the mouse and clicking on the Delete button. Or, you can change a term by clicking on it in the list, entering the new term, and clicking on the Change button.
ListBoxes and ComboBoxes are an effective way to present a large number of choices to the user in a limited amount of space.
In ATEasy v5, you can create a List Box with Check boxes for each list item:
by turning on the CheckBoxes property: