System.Actions.TContainedAction.SetName
Delphi
procedure SetName(const Value: TComponentName); override;
C++
virtual void __fastcall SetName(const System::Classes::TComponentName Value);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | System.Actions.pas System.Actions.hpp |
System.Actions | TContainedAction |
Description
Sets the Name and Caption properties of the action.
SetName calls the inherited System.Classes.TComponent.SetName method to set the specified Value
to the Name property of the action. If the action does not have any clients and the current values of the Name and Caption properties of the action are equal, then SetName sets Value
to the Caption property of the action also.
Warning: Using SetName to change the name of an action at run time causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception.