[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'ActnList' (#lcl)

# TCustomAction.SetName

Sets the value for the Name property.

## Declaration

Source position: actnlist.pas line 188

`protected procedure TCustomAction.SetName(`
`const Value: TComponentName`
`); override;`

## Arguments

`Value` |  | New value for the Name property.

## Description

SetName is overridden in TCustomAction. It calls the inherited method to ensure that Value is a valid identifier name for the component and its owner (when assigned). The inherited method may raise an EComponentError exception if the name in value is not a valid identifier. The new property value is also assigned to the Caption property in the action when the number of control clients is 0.

## Version info

Modified in LCL version 4.0 to improve compatibility with newer Delphi VCL versions; changed to protected visibility.

## See also

TCustomAction.Caption |  | The Caption to be used if this action is associated with a visible component.
TBasicAction
TComponent.Name
TComponentName