6. Creating and Using Basic Fields : Scalar Fields : List Views : Create a List View
 
Share this page                  
Create a List View
You can create a list view on a form.
To create a list view
1. Open your frame in the Frame Editor (see Open an Existing Frame (see Open an Existing Frame)).
2. Select the List View icon on the field palette.
3. Place the list view field on the form.
4. Accept the default value of TRUE for the HasColumnHeaders property in the Property Inspector and the default value of LVFS_DETAIL for the Style property.
Note:  For complete descriptions of each field property, see List View Properties (see List View Properties) and Common Field Properties (see Common Field Properties).
5. Select the ColAttributes property.
The Column Attributes dialog appears:
6. Click in the Width column of the first item and change the column width (for example, 1000).
7. Tab to the next column, Header Text, and replace the default text, Column 1, with text of your choice (for example, Gender).
8. Repeat Steps 6 and 7, replacing the default text with your values for as many columns as you want for the field.
Note:  To add a column, tab to the Width column in the first empty row and enter a value. This action in effect changes the number of columns in your list view.
9. Set the Text Alignment of all the columns using the drop-down menus.
Note:  The first column in a list view must be left-aligned.
10. Click OK.
The ColAttributes property indicates the number of columns in your list view:
11. Select the ValueList property to specify the items for the first column only using the Value List dialog. (For example, you might want to specify "males" and "females" for the Gender column.)
Note:  For more information about using the ValueList property to define a choice list for the list view, see Add and Delete List Field Items (see Add and Delete List Field Items). Also, for more information about populating the other columns in a list view, see the chapter "Working with List Views and Tree Views" in the Programming Guide.