Share via


Field Mapping Tab, Options Dialog Box

Makes it possible for 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 Window. For example, you can specify that Visual FoxPro create an edit box when you drag a Character field onto a form.

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.

  • Map fields to classes for drag-and-drop operations
    Displays the current mappings between field types and classes (controls). The list includes:
    • Type All supported data types for database fields. The field type Multiple is used to specify the class that will be created if you drag an entire table or multiple fields onto a control at once. The field type Label is used to specify the class that will be created for the field captions.
    • Class Library The library containing the class definition to map to a field type. If this column is blank, the field type is mapped to a Visual FoxPro base class.
    • Class Name The class to which a field type is mapped, which specifies the type of control that will be created.
  • 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.

See Also

Modify Field Mapping Dialog Box | Options Dialog Box | Data Environment Designer | Database Designer | Project Manager Window | Adding Visual FoxPro Controls to a Form | Adding Controls to a Form with the Component Gallery