Field Mapping Tab, Options Dialog Box

See Also

Enables you to specify what type of control Visual FoxPro creates when you drag a table or field to a form from the Data Environment Designer, Database Designer, or Project Manager. For example, you can specify that Visual FoxPro creates an edit box when you drag a Character field onto a form.

For details about creating fields using drag-and-drop, see “Adding Controls Quickly” in Chapter 8, Managing Data Through Forms in the Programmer’s Guide.

When you choose Set As Default — which appears on every tab in the dialog box — Visual FoxPro saves the option settings in the registry (system Windows registration database). Note that in this tab, choosing OK also saves the option settings in the registry.

Tab Options

Map fields to classes for drag-and-drop operations

Displays the current mappings between field types and classes (controls). The list includes:

Modify

Choose this button to display the Modify Field Mapping dialog box, where you can specify a different mapping for the selected field type.

To modify field mappings

  1. In the Field Mapping tab of the Options dialog box, choose Modify.

  2. In the Modify Field Mapping dialog box, select a field type from the Type list.

  3. To set the class that is created whenever you drag a table or multiple fields, select Multiple.

  4. To select the class library (.vcx file) that contains the control you want to associate with the selected field type, choose Browse.

  5. Select a class name from the Name list. The class you specify here will be created any time a field of the selected type is dragged onto a form.

  6. Choose OK or Apply to accept the mapping.

Database options

Drag-and-drop field caption

Choose this option if you want Visual FoxPro to use the name of the field as the caption of the class being created. If you clear this option, Visual FoxPro will not create field captions.

Copy field comment

Choose this option to have Visual FoxPro copy the comment from a field (if any) to the Comment property of the new class when creating it.

Copy field input mask

Choose this option to have Visual FoxPro copy the input mask of a field (if any) to the InputMask property of the new class when creating it.

Copy field format

Choose this option to have Visual FoxPro copy the format specification from a field (if any) to the Format property of the new class when creating it.

For more information, see “Adding Controls to a Form” in Chapter 8, Managing Data Through Forms, in the User’s Guide