ProMatrix Control Builder

If you use a VPME Form Builder to put controls on a form, you wonít need to use the ProMatrix Control Builder. However, if you put fields on a form some other way (such as, dragging and dropping fields from the Data Environment to a form), you will need to select the resulting controls and run the ProMatrix Control Builder.

The primary purpose of the Control Builder is to change the class on which a control is based to the corresponding VPM Enterprise control class. The VPM Enterprise control classes contain properties and methods that provide unique functionality for controls. The VPM Enterprise classes for databound controls (for example, the textbox control) link the controls to VPMís field-level security, field-level data dictionary properties and field validation.

ō To run the ProMatrix Control Builder

1.   Place controls on a form in the Form Designer.

2.   Select the controls by holding the shift key while clicking on them or by drawing a selection box around them.

3.   Right click on one of the selected controls. Select the Builder option on the popup menu.

4.   Select the ProMatrix Control Builder on the Builder Selection dialog. Click OK.

Select the Labels: When you run the Control Builder, BE SURE TO SELECT THE LABEL associated with a control as well as the control.

What the Control Builder Does in Detail

If you are interested in the details of what the ProMatrix Control Builder does, hereís the processing sequence:

∑       Opens the controls class library specified on the Project Options dialog (see Project Options on the Options menu).

∑       For the controls that were selected, the labels are removed from the form. They will be added back later after their associated controlís class is changed.

∑       For each selected control, the following is performed:

∑       A name for the control is created that includes a three character prefix that identifies the type of control along with the table, view or CursorAdapter alias and field name from the controlís Control Source property.

∑       If the control is already based on the correct class in the control class library, the process of changing the controlís class is not performed.  Otherwise, the control is removed from the form and then added back based on the corresponding control from the controls class library.  In this process, only some of the property settings of the original control are preserved while the rest of the properties take on the default settings of the new class.

∑       The control is sized to match the field width as stored in the data dictionary.

∑       If the control is the type of control that should have a label, a label is added.  For example, text boxes, spinners and editboxes have labels, checkboxes do not.  The labelís caption is filled-in with the associated controlís label (caption) as stored in the data dictionary.  The label is then positioned to the left of the associated control.

More:

Single-Record Forms