Vcl.Forms.IsAccel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsAccel(VK: Word; const Str: string): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall IsAccel(System::Word VK, const System::UnicodeString Str);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms Vcl.Forms

Description

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

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.

See Also