Specifying the control to receive input focus when current event function returnsΒΆ

setfocus

Specify control to receive input focus when current event function returns


SYNTAX

setfocus control_id[[row]]

This command is used within event functions called during a dialog command, to specify the control that is to have input focus when the function returns. The control may be any textbox, button, listbox or table currently enabled in the dialog.

control_id

The identifier of the control to receive focus. The control may be any textbox, button, listbox or table currently enabled in the dialog.

[[row]]

The row to have input focus may be specified with the following control types:

Multi-row textboxes

Textboxes with a rows = clause and no height = clause.

Free format textboxes

Textboxes with a height = clause. Note that a rows = clause, which is optional for this textbox type, must also be defined if the setfocus command is to assign focus to a specific row.

If no dialog is active, the effect of the setfocus command is undefined.


NOTES

  • The table_focus_cell() command is used to send input focus to a specific cell in an editable table.


EXAMPLES

setfocus Button3
setfocus MultiBox[6]

RELATED TOPICS

dialog

Textboxes

table_focus_cell()

set_foreground_window()