RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Forms.IsAccel Function

Indicates whether a particular character is an accelerator character (or hot key) within a given menu caption or other text string.

Pascal
function IsAccel(VK: Word; const Str: string): Boolean;
C++
Boolean IsAccel(Word VK, const AnsiString Str);

Call IsAccel to determine whether the character represented by the VK (virtual key) parameter appears as an accelerator in the string specified by the Str parameter. IsAccel only looks for accelerators that are identified by a preceding ampersand (&). Such accelerators appear underlined in the string when displayed as a control's caption. 

Use IsAccel when processing key events to determine whether a key matches an accelerator character in a control's caption.

Note: IsAccel does not recognize hot key combinations in menu items that are identified by the HotKey property.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!