3.8. Assign Accelerator Keys
About this task
- Accelerator key definition.
- Create an accelerator key.
- Guidelines for accelerator keys.
Accelerator key definition
Accelerator keys:
- Enable users to access dialog box controls by pressing Alt + <specified letter>.
- Are essentially a single letter from a control's label.
Users can employ accelerator keys to:
- Choose a push button or an option button.
- Toggle a check box on or off and move the insertion point into one of the following.
- Text box
- Group box
- Currently selected item in one of the following.
- List box.
- Combo box.
- Drop list box..
Create an accelerator key
Procedure
Results
The designated letter is now underlined on the control's label; users will be able to access the control by pressing Alt +<underlined letter>.
Guidelines for accelerator keys
- Accelerator keys can be assigned directly to the following controls that have their own label
- Check boxes
- Group boxes
- Option buttons
- Push buttons
- The OK and Cancel buttons cannot have accelerator keys
Note: OK and Cancel labels cannot be edited.
- A de facto accelerator key can be created for certain controls that do not have their own labels by assigning an accelerator key to an associated text control.
- Combo boxes
- Drop list boxes
- List boxes
- Text boxes
- Accelerator key assignments must be unique within a particular dialog box. If you attempt to assign the same accelerator key to more than one control, a message displays reporting that the letter has already been assigned.