Xbasic

{EMBEDDED}

Syntax

{EMBEDDED= [ %S% ] Width, Height : Dialog_Name }

Arguments

Width

Numeric. The width of the control in characters, by default based on the default font: Arial 8.

Height

Numeric. The height of the control in lines, by default based on the default font: Arial 8.

Dialog_Name

Character. The name of the modeless dialog to embed.

Description

The {EMBEDDED} command embeds a modeless dialog into another modeless dialog.

Example

ui_modeless_dlg_box("ParentDialog",<<%dlg%
{startup=init}
{frame=1,1}
{embedded=40,20:ChildDialog};
{lf};
{sp};
<close>
%dlg%,<<%code%
if a_dlg_button = "Hello" then
    ui_dlg_event("ChildDialog","Hello",.t.)
    ui_msg_box("","Another message from the parent dialog")
end if
if a_dlg_button = "init" then
    a_dlg_button = ""
    show_embedded(local_variables())
end if
if a_dlg_button = "close" then
    ui_modeless_dlg_close("ParentDialog")
end if
%code%)
function show_embedded as v (vars as P)
    with vars
ui_modeless_dlg_box("ChildDialog",<<%dlg%
{wrap=40}
This is an embedded dialog box that responds to the Hello event sent to it from its parent.;
{lf};
Name: [.20name];<Hello!Hello>;
{lf};
Enter a name into the Name field and click this button. After 2 seconds, the "Hello" dialog box will appear.;
{lf};
;
%dlg%,<<%code%
if a_dlg_button = "Hello" then
    sleep(2)
    ui_msg_box("","Hello: " + name)
end if
%code%)
  
    end with
end function

Limitations

Desktop applications only

See Also