Xbasic
UI_DLG_NAVIGATE Function
Syntax
L UI_DLG_NAVIGATE(C title,C direction)
Arguments
- 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
Move to a different control - directions are 'next' and 'prev'.
Discussion
The UI_DLG_NAVIGATE() function moves the cursor and focus to the next or previous control on the Xdialog form.
Example
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 "!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%)
Limitations
Desktop applications only.
See Also