Applies to TestComplete 14.50, last modified on August 05, 2020

The TcxButton component represents a push button control.

The text displayed on the button is specified by the Caption property. Using the Colors and Glyph properties, you can adjust the button’s appearance in different states -- normal, disabled, pressed and so on. This allows the user to easily distinguish each button state. The Glyph property lets you specify images for different button states whereas the Colors property holds a list of the button’s background colors for different states.

You can make a group of buttons simulate the radio group by specifying the GroupIndex property.

To enable the button to close the form, set its ModalResult property. The ModalResult value of the button used to close the form is returned by the UserForm.ShowModal method, so you can determine which button the user pressed to close the form and choose the actions that should be performed based on this value.

You can also enable the user to perform a click on the button by pressing the Enter or Esc key. To do that, use the Default or Cancel property respectively.

The TcxButton object raises a number of events that you can process in your scripts. For example, you can create an event handler for the OnClick event to process button presses.

TcxButton Properties

TcxButton Methods

TcxButton Events

See Also

User Forms

Highlight search results