OnButtonClick Event

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

Occurs when the user presses a component’s button.

There are two variants of the event:

Declaration

OnButtonClick(Sender) Parameters
Sender [in] Required Object
OnButtonClick(SenderAButtonIndex) Parameters
Sender [in] Required Object
AButtonIndex [in] Required Integer

Applies To

The event is used by the following components:

TcxMRUEdit, TcxButtonEdit

Description

The first variant of the OnButtonClick event is used by the TcxMRUEdit component. The second variant is used by the TcxButtonEdit component.

TcxMRUEdit

The TcxMRUEdit component contains two buttons: the ellipsis button and the down-arrow button. The OnButtonClick event occurs when the user presses the component's ellipsis button. Create an OnButtonClick event handler to process pressing of the ellipsis button. For instance, if the TcxMRUEdit component is used to specify file names, the event handler will display the Open File dialog.

Parameters

The event version used by the TcxMRUEdit component has the following parameters:

Sender

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

TcxButtonEdit

The TcxButtonEdit component may contain several buttons. The OnButtonClick event occurs when the user presses any of these buttons. Create an OnButtonClick event handler to perform specific actions in response to pressing the button.

Parameters

The event version used by the TcxButtonEdit component has the following parameters:

Sender

The user form component that raised the event.

AButtonIndex

The index (zero-based) of the button that was pressed.

See Also

Handling Events in User Forms
Count Property
OnPopup Event

Highlight search results