Label.AcceleratorKey

From Xojo Documentation

Event


Label.AcceleratorKey()

Supported for all project types and targets.

The accelerator key for the Label was pressed.

Notes

You can define an accelerator character for a Label. In the Text property, precede the accelerator character with an ampersand. For example, the entry "&Home" signifies that the H is the accelerator. Now, pressing Alt+H on Windows triggers the AcceleratorKey event where you will typically set focus on the related TextField (or other related control).

Example

Set focus on the TextField when the accelerator key for the Label was pressed:

FirstNameField.SetFocus