Cancel

Applies to

CommandButton, PictureButton, OLECustomControl controls

Description

Cancel defines whether the Esc key activates the button or control. If the Cancel property is enabled, the Esc key triggers the control's Clicked event. If Cancel is not enabled, the control does not respond to the Esc key.

If you enable Cancel for more than one control, the last one set responds to the Esc key.

Usage

In a painter

To enable the Cancel property:

  • Select the Cancel check box on the General page of the control's Properties view.

In scripts

The Cancel property takes a boolean value. The following line allows the CommandButton to respond to the Esc key:

cb_1.Cancel = TRUE