retirement_button prototype as follows:
For some dialog boxes, you may want to change the text of one of the exit buttons. For example, if you create a dialog box capable of destroying data, it's safer to call the button Destroy instead of OK. To do this, use thedestroy_button : retirement_button {
label = "&Destroy";
key = "destroy";
}
&) in the label attribute. This assigns a mnemonic to the tile. In this case the letter D is underscored in the button label and becomes the mnemonic.
Notice the use of the ampersand (ok_cancel_help:
Once you have defined a custom exit button, you need to embed it in a subassembly that matches the appearance and functionality of the standard clusters. The following example shows the current definition ofok_cancel_help : column {
: row {
fixed_width = true;
alignment = centered;
ok_button;
: spacer { width = 2; }
cancel_button;
: spacer { width = 2; }
help_button;
}
}
ok_button with the new button as follows:
Create a new subassembly that replaces thedestroy_cancel_help : column {
: row {
fixed_width = true;
alignment = centered;
destroy_button;
: spacer { width = 2; }
cancel_button;
: spacer { width = 2; }
help_button;
}
}
destroy_button. Where the dialog box's action can be destructive (or very time-consuming), it is strongly recommended to make the Cancel button the default. In this case, it functions both as the default and as the Abort button:
In the standard subassembly, the OK button is the default, but this attribute wasn't added todestroy_cancel_help : column {
: row {
fixed_width = true;
alignment = centered;
destroy_button;
: spacer { width = 2; }
: cancel_button { is_default = true; }
: spacer { width = 2; }
help_button;
}
}
cancel_button.
Because an attribute has been changed, the original Cancel button is used as a prototype, requiring a colon in front of