FMX.Forms.TCommonCustomForm.ValidateRename

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ValidateRename(AComponent: TComponent; const CurName, NewName: string); override;

C++

virtual void __fastcall ValidateRename(System::Classes::TComponent* AComponent, const System::UnicodeString CurName, const System::UnicodeString NewName);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TCommonCustomForm

Description

Ensures that renaming an owned component does not create a name conflict.

FMX.Forms.TCommonCustomForm.ValidateRename inherits from System.Classes.TComponent.ValidateRename. All content below this line refers to System.Classes.TComponent.ValidateRename.

Ensures that renaming an owned component does not create a name conflict.

ValidateRename checks whether a component can rename one of its owned components, passed in AComponent, from its current name (CurName) to the string passed in NewName. If AComponent is nil (Delphi) or NULL (C++) or NewName is already the name of a component in the Components list, ValidateRename raises an EComponentError exception.

ValidateRename is used internally when the Name property is modified. It is not necessary to call it directly.

See Also