The ListBox and ComboBox controls provide list boxes and drop-down list boxes that the user can scroll through to see options or pieces of information. List boxes can display multiple items, while drop-down list boxes can display one item at a time. However, the user can click the scroll arrow to display and scroll through a list of all the items in the list box.
|If you have space on the form and want to emphasize the choices the user can make, use a list. To conserve space and emphasize the currently selected item, use a drop-down list box.
You can fill a list box or combo box with items from a variety of sources by setting the RowSourceType and RowSource properties. For more information, see How to: Choose the Type of Data for a List or Combo Box.
To see several examples demonstrating list boxes and drop-down list boxes, run Solution.app in the Visual FoxPro directory, ...\Samples\Solution.
In This Section
- How to: Choose the Type of Data for a List or Combo Box
- Describes the various source types that can be used to populate a ListBox or ComboBox control.
- How to: Create Multicolumn List Boxes
- Describes how to create a list with multiple columns displayed.
- How to: Allow Users to Select Multiple Items in a List Box
- Explains how to allow multiple items in a list to be selected.
- How to: Allow Users to Add Items to a List Box
- Describes how to add items to a list interactively using the AddItem method.
- How to: Refresh a One-to-Many Display Based on a List Value
- Describes how to design a one-to-many list based on local or remote views.
- How to: Display Child Records in a List
- Explains how to display child records in a list.
- How to: Add Pictures to Items in a List
- Provides information on how to display pictures in a list.
- Using Controls
- Controls manage the interactions between users and your application. Visual FoxPro offers a variety of controls to enhance your application interface.
- Controls and Objects Created in Earlier Versions
- Describes support for controls and objects created in earlier FoxPro versions and new controls added to Visual FoxPro.