Modifier

Partager via


Dialog.HideSubsequentDialogs([Boolean]) Method

Version: Available or changed with runtime version 1.0.

Specifies that subsequent child dialogs are not shown.

Syntax

[HideSubsequentDialogs := ]  Dialog.HideSubsequentDialogs([HideSubsequentDialogs: Boolean])

Note

This method can be invoked using property access syntax.

Note

This method can be invoked without specifying the data type name.

Parameters

Dialog
 Type: Dialog
An instance of the Dialog data type.

[Optional] HideSubsequentDialogs
 Type: Boolean
A value specifying whether to hide subsequent dialogs.

Return Value

[Optional] HideSubsequentDialogs
 Type: Boolean
True if HideSubsequentDialogs is set to true; otherwise, false.

Remarks

You must call the HideSubsequentDialogs method on the dialog variable before the Open Method. Until the Open Method is called on this variable, calls on other dialog variables will behave as normal.

Example

The following code illustrates how the HideSubsequentDialogs method works with two dialog variables.

var
  MyDialog1 : Dialog;
  MyDialog2 : Dialog;
  Text000 : Label 'additional text';
  begin

    // The HideSubsequentDialogs method is used on MyDialog1 dialog.
    MyDialog1.HideSubsequentDialogs := true;

    // When MyDialog1 dialog opens, it will register as the root dialog.
    MyDialog1.Open('Dialog 1');
    Sleep(2000);

    // MyDialog2 dialog will not open. However, the code associated with the Open call will run as if it was actually opened.
    MyDialog2.Open('Dialog 2');
    Sleep(2000);

    // Updating MyDialog2 dialog will have no effect
    MyDialog2.Update(1, Text000);
    Sleep(2000);

    // MyDialog1 dialog will open 
    MyDialog1.Open('Dialog 1 #1', Text000);
    Sleep(2000);

    // As soon as MyDialog1 dialog is closed, other can be reopened and they will no longer be hidden
    MyDialog1.Close;

    MyDialog2.Open('Dialog 2');
    Sleep(2000);

  end;  

Dialog Data Type
Get Started with AL
Developing Extensions