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

# TComponent.ValidateRename

Called when a name change must be validated

## Declaration

`protected procedure TComponent.ValidateRename(`
`AComponent: TComponent;`
`const CurName: String;`
`const NewName: String`
`); virtual;`

## Description

ValidateRename checks whether NewName is a valid replacement for CurName for component AComponent. Two owned components of a component can not have the same name. If a child component with the same name is found, then an exception is raised.

## See also

TComponent.SetName |  | Write handler for Name property.
TComponent.Name |  | Name of the component.