Vcl.Menus.TMenu.DispatchCommand
Delphi
function DispatchCommand(ACommand: Word): Boolean;
C++
bool __fastcall DispatchCommand(System::Word ACommand);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Menus.pas Vcl.Menus.hpp |
Vcl.Menus | TMenu |
Description
Calls the Click method of the menu item with the specified value as its Command property.
Call DispatchCommand to simulate a click on the menu item associated with a command ID. If DispatchCommand locates a menu item that matches the command ID, it calls the Click method for that menu item and returns true. If there is no such item, DispatchCommand returns false.