OnObjectPicked Event

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

Occurs after the user selected a window or control on screen with the TObjectPicker or TRectObjectPicker component.

Declaration

OnObjectPicked(Sender) Parameters
Sender [in] Required Variant

Applies To

The event applies to the following components:

TObjectPicker, TRectObjectPicker

Description

The OnObjectPicked event occurs after the user selected a window or control on screen with the target glyph () of the TObjectPicker component, or with the Rectangle Selector tool () of the TRectObjectPicker component.

Parameters

The event has the following parameter:

Sender

Contains a reference to the user form component that has raised the event.

Remarks

To obtain the name of the selected onscreen object, use the PickedObjectName property of the TObjectPicker or TRectObjectPicker component.

To obtain a reference to the selected object, pass the object’s name to the eval (JavaScript, JScript, Python, C#Script, C+Script), Eval (VBScript) or Evaluate (DelphiScript) function. These functions are provided by the scripting engines. For detailed information about getting an object reference from a name, see the TObjectPicker or TRectObjectPicker description.

See Also

Handling Events in User Forms
TObjectPicker Object
TRectObjectPicker Object

Highlight search results