Xbasic

{BEGINEMBEDDED}

Syntax

{BEGINEMBEDDED} ... Xdialog Code ... {ENDEMBEDDED}

Description

The {BEGINEMBEDDED} command allows you to embed an Xdialog within another Xdialog with in-line code, rather than using the {EMBEDDED} command to define a window within the parent xdialog in which the embedded dialog will be displayed.

Example 

The following example embeds the data entry fields and Inside button (to the right of the list box).

dim lv as P
dim pe as P
lv = local_variables()
people=<<%str%
Kerry
Aaron
Jay
Claire
Ethel
%str%
ui_dlg_box("{BEGINEMBEDDED}",<<%dlg%
{stretch=width}
[.40,10name^#people]
{hslider}
{beginembedded}
{stickto=left}
Name|{stretch=width}[.20Name];
{stickto=left}Company|{stretch=width}[.30Company];
{stickto=left}Address|{stretch=width}[.30Address1];
|[.30Address2];
|[.15City]{stickto=right}[.3Atate][.9ZIP];
{stickto=left}<Inside>
{endembedded};
{stretch=width}
{line=1,0};
{stickto=left,bottom}
<Ok>
%dlg%,<<%code%
if a_dlg_button = "Inside" then
    pe = *for_each(i,i+" = "+eval(i),properties_enum(lv))
    a_dlg_button = ""
    ui_msg_box("event",pe)
    delete pe
end if
%code%)

Limitations

Desktop applications only

See Also