WebMessageDialog.CancelButton

From Xojo Documentation

Read-Only Property (As WebMessageDialogButton )
WebMessageDialogButtonValue = aWebMessageDialog.CancelButton

New in 2020r1

Supported for all project types and targets.

The cancel button for the WebMessageDialog.

Notes

Even though this property is read-only, it has a WebMessageDialogButton instance assigned to it which you can modify.

The CancelButton is invisible by default thus you will need to set its Visible property to True before displaying the dialog in order to see it.

The Escape key is automatically mapped to this button though you can change that but altering the Cancel property of the button.

Sample Code

This example makes the button visible, removes the Escape key mapping and changes the caption to "No":

myDialog.CancelButton.Visible = True
myDialog.CancelButton.Cancel = False
myDialog.CancelButton.Caption = "No"

See Also

WebMessageDialogButton class, ActionButton and AlternateActionButton properties.