System.Classes.TComponent.Name

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Name: TComponentName read FName write SetName stored False;

C++

__property TComponentName Name = {read=FName, write=SetName, stored=false};

Properties

Type Visibility Source Unit Parent
property published
System.Classes.pas
System.Classes.hpp
System.Classes TComponent

Description

Specifies the name of the component as referenced in code.

Use Name to change the name of a component to reflect its purpose in the current application. By default, the IDE assigns sequential names based on the type of the component, such as 'Button1', 'Button2', and so on.

Use Name to refer to the component in code.

Warning: Changing Name 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.

See Also


Code Examples