IUiCommandExecutionContext.Modal

Syntax

Modal: Boolean;

Description

The Modal property determines whether the dialog box is to be opened modally relative to the window specified in the ParentWindow property.

Comments

The property is set to False by default, and the dialog box does not open modally.

When the property is set to True, the dialog box opens modally relative to the window specified in the ParentWindow property. If the property is set to True but the ParentWindow property is not specified, the dialog box does not open modally. The property is relevant when the following commands are used:

NOTE. A number of dialog boxes always opens modally relative to the window specified in the ParentWindow property or relative to the object navigator if the ParentWindow property is undefined.

Example

Executing the example requires a form and a button named Button1 on the form.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        CommandTarget: IUiCommandTarget;
        Context: IUiCommandExecutionContext;
    Begin
        CommandTarget := WinApplication.Instance.GetPluginTarget("Db");
        Context := CommandTarget.CreateExecutionContext;
        Context.Data := MetabaseClass.Active.Root;
        Context.ParentWindow := Self As IWin32Window;
        Context.Modal := True;
        CommandTarget.Execute("LinkTables", Context);
    End Sub Button1OnClick;

Clicking the button opens the linked table creation wizard. The dialog box opens modally relative to the current form. If all parameters are specified in the dialog box and the Finish button is clicked, an attached table is created in the root folder of the current repository.

See also:

IUiCommandExecutionContext