Vcl.Menus.TMenuItem.RethinkHotkeys

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RethinkHotkeys: Boolean;

C++

bool __fastcall RethinkHotkeys();

Properties

Type Visibility Source Unit Parent
function public
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMenuItem

Description

Adjusts the captions of subitems so that every item has an accelerator and there are no duplicate accelerator keys.

Call RethinkHotkeys to adjust the accelerator keys for the items in the Items property and in any submenu of those items. RethinkHotkeys checks for items that do not have an accelerator key or that have duplicate accelerator keys. It then replaces any duplicate accelerators with unique characters and adds accelerator keys to items that don't have them. RethinkHotkeys gives first priority to existing accelerator key mappings, but may change them if necessary to ensure uniqueness.

RethinkHotkeys lets a menu adjust the accelerator keys when the AutoHotkeys property is false. For any menu or submenu that has AutoHotkeys set to true, this adjustment occurs automatically.

RethinkHotkeys returns true if RethinkHotkeys changed the Caption property of any menu items, false otherwise.

See Also