OnButtonClick Event

Applies to TestComplete 14.72, last modified on April 22, 2021

Occurs when the user clicks a button embedded into a text box in-place editor.

Declaration

OnButtonClick(DataIndex) Parameters
Data [in] Required Object
Index [in] Required Integer

Description

The OnButtonClick event occurs when the user clicks a button embedded into the in-place editor used by a custom keyword test operation in the Keyword Test editor. You can use the OnButtonClick event handler to perform specific actions in response to the user’s click on a button. For instance, to reset an operation parameter with a default value, to invoke a helper dialog, and so on.

Parameters

The event has the following parameters:

Data

An object that provides access to the operation fields. This object contains properties that correspond to individual operation fields and whose names coincide with the field names.

Index

A zero-based index of the editor’s button that was clicked. Buttons are indexed from left to right.

Remarks

If the OnButtonClick event handler somehow changes the value in the in-place editor, you must also create the HasChanges event handler that will report about these changes.

See Also

Events Reference
GetButtonCount Event
GetButtonImage Event
HasChanges Event
Creating Keyword Test Operations

Highlight search results