{NOCHILDREN}

Syntax

{NOCHILDREN}

Description

By default when Xdialog window opens another Xdialog (for example a button on dialog1 causes dialog2 to open), the second dialog is a "child" of the first dialog and when the first dialog closes, so will the second. The {nochildren} command allows you to open new dialogs from a dialog without them being children of the first dialog.

Supported By

Alpha Five Version 7 and Above

Limitations

Desktop applications only

Examples

ui_modeless_dlg_box("Dialog1",<<%dlg%
This is 'Dialog1';
It is a 'standard' Dialog in that it is the parent of ;
any dialogs that are launched from it.;
{lf};
<Launch Dialog2!launch>
<Close>;
%dlg%,<<%code%

 

if a_dlg_button = "close" then
    ui_modeless_dlg_close("dialog1")
end if

if a_dlg_button = "launch" then
    show_dialog2()
end if
%code%)

'Move this dialog out of the way so that the next dialog that opens does not obscure it.

ui_dlg_move("dialog1",1,1)


ui_modeless_dlg_box("Dialog1_NoChildren",<<%dlg%
{nochildren}
This is 'Dialog1_NoChildren';
It has the '\{nochildren}' command. Therefore, it is NOT the parent of;
any dialogs that are launched from it.;
{lf};
<Launch Dialog2!launch>
<Close>;
%dlg%,<<%code%

 

if a_dlg_button = "close" then
ui_modeless_dlg_close("dialog1_NoChildren")
end if

if a_dlg_button = "launch" then
show_dialog2()
end if

 

%code%)

'-------------------------------------

function show_dialog2 as v ()

 

ui_modeless_dlg_box("Dialog2",<<%dlg%
This is Dialog 2;
If this dialog was launched from 'Dialog1' then it is;
a child of Dialog 1, so when you close Dialog 1;
this dialog will also close;
{lf};
However, if this dialog was launched from 'Dialog1_NoChildren';
{lf};
<Close>;
%dlg%,<<%code%

 

if a_dlg_button = "close" then
    ui_modeless_dlg_close("dialog2")
end if

 

%code%)

end function

See Also

Xdialog Commands