UI_DLG_CTL_GOTO()
Syntax
Result_Flag as L = UI_DLG_CTL_GOTO( Title as C, Control_Name as C )
|
Argument |
Description |
|
Result_Flag |
Indicates whether the function succeeded.
|
|
Title |
The name of the dialog box. |
|
Control_Name |
The name of the control. |
Description
The UI_DLG_CTL_GOTO() function sets focus to a control in a dialog.
Supported By
Alpha Five Version
Limitations
Desktop applications only.
Example
This example captures the setfocus event of F2 and returns the cursor to F1.
|
dim dlg_title as C = "Basic Modeless Dialog" dim F1 as C dim F2 as C ui_modeless_dlg_box(dlg_title,<<%dlg% {xmargin=10} {ymargin=2} If you place the cursor in Field Two, it will be moved to Field One; {lf}; Field One [.25F1!F1]; Field Two [.25F2!F2_*]; {lf}; <20,2Close>; %dlg%,<<%code% if a_dlg_button="Close" ui_modeless_dlg_close(dlg_title) end if if (a_dlg_button="F1") then a_dlg_button = "" end if if (a_dlg_button="F2_Setfocus") then a_dlg_button = "" ui_msg_box("Incorrect Response","Moving the cursor to Field One") ui_dlg_ctl_goto(dlg_title, "F1") end if %code%) |
This example sets the tabbing order of fields on a dialog.
|
dim dlg_title as C = "Custom tab order"
ui_dlg_box(dlg_title,<<%dlg% if a_dlg_button = "tab" end if |
See Also