{NEVERGAINFOCUS}

Syntax

{NEVERGAINFOCUS}

Description

The {NEVERGAINFOCUS} prevents an Xdialog from being given focus automatically when it is instantiated. The user can still click on controls in the Xdialog and give them focus.

Supported By

Alpha Five Version 6 and Above

Limitations

Desktop applications only

Examples

ui_dlg_box("Test",<<%dlg%

{wrap=100}

Name: [.20name];

Click 'Show Embedded1' to display. Note that focus stays on the button you just pressed because the embedded dialog has the \{nevergainfocus} command.;

{embedded=30,10:window1};

Click 'Show Embedded2' to display. Note that focus goes to the first control in the embedded dialog.;

{embedded=30,10:window2};

<Show Embedded 1!show1>

<Show Embedded 2!show2>

<Close>

%dlg%,<<%code%

if a_dlg_button = "show1" then

    show_embedded1()

    a_dlg_button = ""

end if

if a_dlg_button = "show2" then

    show_embedded2()

    a_dlg_button = ""

end if

%code%)

function show_embedded1 as v ()

ui_modeless_dlg_box("window1",<<%dlg%

{nevergainfocus}

This is the embedded Dialog 1:;

{line=1,0};

Address: [.20address];

%dlg%,<<%code%

1=1

%code%)

end function

function show_embedded2 as v ()

ui_modeless_dlg_box("window2",<<%dlg%

This is the embedded Dialog 2:;

{line=1,0};

Address: [.20address];

%dlg%,<<%code%

1=1

%code%)

end function

See Also

Xdialog Commands