SetFocus Method

Applies to TestComplete 15.69, last modified on November 13, 2024

Moves the input focus to the object for which the method is called.

Declaration

collectionObj.SetFocus()
collectionObj     One of the objects listed in the Applies To  
Result     None  

Applies To

This method applies to the following objects:

TBevel, TcxButton, TcxButtonEdit, TcxCalcEdit, TcxCheckBox, TcxComboBox, TcxCurrencyEdit, TcxDateEdit, TcxGroupBox, TcxLabel, TcxListBox, TcxMemo, TcxMRUEdit, TcxProgressBar, TcxRadioGroup, TcxSpinEdit, TcxTextEdit, TcxTimeEdit, TImage, TObjectPicker, TPanel, TRectObjectPicker, TShape

Description

Use the SetFocus method to set the input focus to the control or user form for which the method is called. If the control cannot obtain the input focus, the method fails and posts and error message to the test log.

Highlight search results