Practical use of ampersands will be in one of two ways:
- To provide a Hotkey
- To display an '&' character
For hotkeys to work correctly, any one screen must only have one instance of any particular hotkey combination. For example, having two buttons, say a Close Button and a Cancel button both with an Alt + C hotkey will not behave correctly.
To assign a hotkey, place an ampersand character before the character in the caption you want to associate with the hotkey. It can be any character in the caption, but avoid using a (space) character.
For Example:
Display Caption |
Actual Caption |
Hotkey |
Aardvark |
&Aardvark |
Alt + A |
Aardvark |
Aard&vark |
Alt + V |
Aardvark |
Aardvar&k |
Alt + K |
If you have entered in your translations and are happy with your hotkeys but on a few screens the hotkeys clash, you have the option of entering a override for that particular control – See the section on overrides for more detail.
To display an '&' character in a caption, simply provide two next to each other '&&'
Display Caption |
Actual Caption |
Salt & Pepper |
Salt && Pepper |
Save & Exit |
Save && Exit |
In some cases you will want to display a '&' in the caption and provide a Hotkey as well.
Display Caption |
Actual Caption |
Hotkey |
Save & Exit |
&Save && Exit |
Alt + S |