Returns or sets whether an ampersand (&) included in the text of the Caption property of the object defines an access key.
Object.UseMnemonic [ = bUseMnemonic ]
The UseMnemonic property syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
ALabel |
ALabel control |
|
bUseMnemonic |
Bool |
A boolean expression that specifies whether an ampersand (&) in the Caption property of the object will define an access key. |
bUseMnemonic can be one of the following:
|
Value |
Description |
|
True * |
Any ampersand (&) appearing in the text of the Caption property causes the character following the ampersand to become an access key. The ampersand itself isn't displayed in the interface of the ALabel control. The Alt + key is used to set the focus to the control that can accept keyboard following the label in the tab order. To include an ampersand in a caption without creating an access key, include two ampersands (&&). |
|
False |
Any ampersand appearing in the text of the Caption property is displayed as an ampersand in the interface of the ALabel control. |
The following statement changes the ALabel UseMnemonic:
lbl1.UseMnemonic=True