Creating a Master Form

To create a master form, execute the following operations:

  1. Create a form with the PluginMasterForm identifier. This form should inherit from the AdhocUserMasterForm class. Select the formula and in the object inspector on the Properties tab set the Parameters: value for the Text property.

  2. Place the Label component with the Label_Caption identifier at the upper part of the form. Select this component and in the object inspector on the Properties tab set the Title value for the Text property.

  3. Add the EditBox component with the EditBox_Caption identifier on the form. Select this component and in the object inspector on the Events tab set the OnChange event. The event handler code is given below. The form should look as follows:

  1. Add links to the Adhoc and PluginViewForm system assemblies in the current repository.

  2. Set form code:

Class PluginMasterFormForm: AdhocUserMasterForm
    Label_Caption: Label;
    EditBox_Caption: EditBox;
    ViewForm: PluginViewFormForm;

    // Handle event: change text in EditBox_Caption
    Sub EditBox_CaptionOnChange(Sender: Object; Args: IEventArgs);
    Begin
        ViewForm.SetLabelText(EditBox_Caption.Text);
    End Sub EditBox_CaptionOnChange;
    
    // Function of getting visualizer form
    Function GetViewForm: PluginViewFormForm;
    Begin
        Return ViewForm;
    End Function GetViewForm;
    
    { Procedure of setting visualizer form and
      initial value EditBox_Caption.
      Implementation AdhocUserMasterForm.View}

    Protected Sub set_View(Val: Object);
    Begin
        ViewForm := Val As PluginViewFormForm;
        EditBox_Caption.text := GetViewForm.GetLabelText;
    End Sub set_View;

End Class PluginMasterFormForm;

See also:

Creating a Plugin | AdhocUserMasterForm