SetFocus Method

Applies to TestComplete 14.0, last modified on January 23, 2019

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