RAD Studio VCL Reference
ActnList.RegisterActions Function

Registers action classes so that they appear in the list of predefined actions in the action list editor or customize dialog.

procedure RegisterActions(const CategoryName: string; const AClasses: array of TBasicActionClass; Resource: TComponentClass);
RegisterActions(const AnsiString CategoryName, const array of TBasicActionClass AClasses, TComponentClass Resource);

RegisterActions allows a class to appear in the action list editor or customize dialog as a selection when you choose New Action or Add Standard Action. Predefined actions are registered automatically. To install your own action classes so that they can be added to an action list or action manager, call RegisterActions to register them. 

The CategoryName parameter specifies the value of the actions' Category property.  

The AClasses parameter is an array of custom action class names.

Note: In C++, the AClasses_Size parameter specifies the index of the last entry in the AClasses array (one less than the number of classes to register).
The Resource parameter lets you assign default values to the properties of the actions being registered. Resource is the class of a TDataModule descendant that contains instances of the action classes listed by AClasses, where the properties of those instances are set to the default values. This parameter can be set to nil (Delphi) or NULL (C++) if there is no need to assign default values. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!