SftButton/OCX 2.5

Accelerator Keys

Softel vdm, Inc.

The Text property defines the control's caption. The caption can include an accelerator key. By using the & character in the Text property, the following character becomes an accelerator key. If the user types Alt plus the defined accelerator key, the control receives the input focus and the Click event occurs.

For example, if the Text property is set to “&Help”, the displayed caption will read "Help", i.e., the H is underlined. If the user types Alt+h, the Click event occurs. To display an & character use "&&".

If the AllowFocus property is set to False, the control does not support accelerator keys. The & character is displayed as-is.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com