Setup a ListBox
This exercise describes how to add items to a ListBox:
- Click and drag a ListBox from the Toolbox to the Design Sheet:
Resize
Click and drag the corners of the control to resize the control.
Reposition
Click and drag the handle (top-left) to reposition the control.
- To bind the ListBox to a field in a dataset, select Set List Binding from the control drop-down menu:
- Choose the dataset field to bind to the ListBox:
- The next step is to add items to the ListBox. Select Edit Items from the control drop-down menu:
- In the Edit Items dialog, click the Add button to add items to the ListBox:
- Save your changes and click Run to run the form:
The ListBox displays the ListBoxItems you have bound to the field in the dataset: