Vcl.Menus.TPopupMenu.AutoHotkeys

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AutoHotkeys;

C++

__property AutoHotkeys = {default=0};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TPopupMenu

Description

Determines whether the accelerator keys for menu items can be reset automatically.

Vcl.Menus.TPopupMenu.AutoHotkeys inherits from Vcl.Menus.TMenu.AutoHotkeys. All content below this line refers to Vcl.Menus.TMenu.AutoHotkeys.

Determines whether the accelerator keys for menu items can be reset automatically.

Set AutoHotkeys to indicate whether the menu should automatically ensure that accelerator keys for its items are reset if necessary so that every menu item has an accelerator key and no two items have the same accelerator key. This ensures that menu items added dynamically at runtime can have accelerator keys that do not introduce conflicts. TMenu tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator.

Before the menu is displayed, the menu checks and adjusts the accelerator key mappings if AutoHotkeys is maAutomatic. When AutoHotkeys is maManual, the menu does not alter the top-level menu items, but may adjust the accelerator keys for submenus, depending on the AutoHotkeys property of the menu item that is the parent of the submenu.

When AutoHotkeys is maManual, an application can still adjust the menu items by calling the Items property's RethinkHotkeys method. AutoHotkeys merely controls whether this adjustment occurs automatically.

Note: The AutoHotkeys property of a menu is linked to the AutoHotkeys property of the TMenuItems object that implements its Items property. Setting one sets the other.

See Also