RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenuItem.RethinkHotkeys Method

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

Pascal
function RethinkHotkeys: Boolean;
C++
__fastcall Boolean RethinkHotkeys();

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!