UI_DLG_NAVIGATE()

Syntax

UI_DLG_NAVIGATE( Dialog_Title as C, Direction as C )

Argument

Description

Dialog_Title

The title of the dialog box.

Direction

The direction in which to move the cursor.

  • "next" = the next control

  • "prev" = the previous control

Description

The UI_DLG_NAVIGATE() function moves the cursor and focus to the next or previous control on the Xdialog form.

Supported By

Alpha Five Version 6 and Above

Limitations

Desktop applications only.

Examples

dim dlg_title as C

dim fn as C

dim ln as C

dim address1 as C

dim address2 as C

dim city as C

dim st as C

dim zip as C

dlg_title = "Advance on Enter"

ui_dlg_box(dlg_title,<<%dlg%

{on_key=enter}

Press Enter to advance to next field. When focus is on OK button, Enter

will close the dialog;

{lf};

{frame=1,1}

{region}

First name: | [.50fn];

Last name: | [.50ln];

Address 1: | [.50address1];

Address 2: | [.50address2];

City: | [.50city];

State: | [.5st];

Zip: | [.10zip];

{endregion};

{lf};

{justify=right}

<10&OK!ok> <10&Cancel!cancel>;

%dlg%,<<%code%

if (a_dlg_button = "enter") then

    if (atc("!ok", ui_dlg_ctl_current(dlg_title)) > 0) then

        'user is on the OK button, so close the dialog

    else

        'user is not on the OK button, so advance to next control

        ui_dlg_navigate(dlg_title,"Next")

        'set a_dlg_button to NULL to keep the dialog open

       a_dlg_button = ""

    end if

end if

%code%)

See Also

Xdialog Function Reference