OnButtonClick Event

Applies to TestComplete 15.42, last modified on August 01, 2022

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


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


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.


The event has the following parameters:


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.


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


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