Setup a ListBox

This exercise describes how to add items to a ListBox:

  1. Click and drag a ListBox from the Toolbox to the Design Sheet:
  2. 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.

  1. To bind the ListBox to a field in a dataset, select Set List Binding from the control drop-down menu:

  1. Choose the dataset field to bind to the ListBox:
  2. The next step is to add items to the ListBox. Select Edit Items from the control drop-down menu:
  3. In the Edit Items dialog, click the Add button to add items to the ListBox:
  4. Save your changes and click Run to run the form:

The ListBox displays the ListBoxItems you have bound to the field in the dataset: