AlertDialog.defaultButton

int defaultButton() @property

Get defaultButton property.

Returns

This property determines what happens when the Return key is

pressed while the alert is shown.

If this property holds the index of a button in [gtk.alert_dialog.AlertDialog.buttons], then pressing Return is treated as if that button was pressed. If it is -1 or not a valid index for the buttons array, then nothing happens.

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

void defaultButton(int propval) @property

Set defaultButton property.

Parameters

propvalThis property determines what happens when the Return key is pressed while the alert is shown. If this property holds the index of a button in [gtk.alert_dialog.AlertDialog.buttons], then pressing Return is treated as if that button was pressed. If it is -1 or not a valid index for the buttons array, then nothing happens. If buttons is NULL, then the automatically created 'Close' button is treated as both cancel and default button, so 0 is returned.