Focused Property (Window and BrowserWindow Objects)

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

The Focused property specifies whether the given object has the input focus. To move the focus to an object, use the SetFocus method.

Declaration

TestObj.Focused

Read-Only Property Boolean
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

True if the object has the focus; otherwise, False.

Remarks

Since only one window has the focus on screen at any given time, you can use this property to determine whether the window (or control) is an active window (control).

Do not confuse the focused and selected states:

  • The focused object is the currently active object, which has the input focus.

  • A selected object is the one that is simply marked (for example, one of items selected in a list box). At that, a selected object may or may not be focused.

See Also

SetFocus Method (BrowserWindow and Window Objects)

Highlight search results