SetItem()

Summary

Moves the keyboard focus to a dialog box item.

Syntax

SetItem(string item_name)

Argument Contents
item_name The name of the dialog box item to receive the keyboard focus

Notes

  • The specified item must be in the current dialog box.

  • This function may be called in the Init macro of a dialog box to set the item that has the focus when the dialog is initially displayed.

Example

if method = 3 then SetItem("name edit control")
else SetItem("type menu")

Error Codes

Error Type Meaning
NotFound The specified item does not exist or is not in the current dialog box

See Also

Function Summary
GetItemSelection() Gets the highlighted portion (selection) of an Edit Text dialog box item
SetItemSelection() Sets the highlighted text in an edit text dialog box item