### Property

# Gtk AlertDialog:cancel-button

since: 4.10

#### Declaration

    property cancel-button: int [ read, write ]

#### Description [src]

Determines what happens when the `Escape` key is pressed while the alert is shown.

If this property holds the index of a button in `GtkAlertDialog:buttons`, then pressing Escape is treated as if that button was pressed. If it is -1 or not a valid index for the `buttons` array, then an error is returned.

If `buttons` is `NULL`, then the automatically created ‘Close’ button is treated as both cancel and default button, so 0 is returned.

Type:`gint`

Available since: 4.10

Default value | -1
Getter method | `gtk_alert_dialog_get_cancel_button()`
Setter method | `gtk_alert_dialog_set_cancel_button()`

#### Flags

Readable | yes
Writable | yes
Construct | no
Construct only | no