Returns the identifier name of the object.
[ sName = ] Object.Name
The Name property syntax has the following parts:
Name |
Type |
Description |
Object |
Object |
An object |
sName |
BString |
A text string used to identify the control. |
The default name for new objects is the kind of object (sometimes using abbreviations) plus a unique integer. For example, the first new Form object is Form1, a new ACheckBox1 object is chk1, and the third TextBox control you create on a form is txt3.
An object's Name property must start with either an underscore or a letter (either uppercase "A-Z" or lowercase "a-z"). Subsequent characters can be letters, numbers (0-9), or underscore ("_") characters, but can't include punctuation or spaces. The name can be of any length, but it best to keep it as short as is needed for clear understanding of its purpose.
Forms can't have the same name as another public object such as Clipboard, Screen, or App. Although the Name property setting can be a keyword, property name, or the name of another object, this can create conflicts in the programming code. Two controls of different types cannot share the same name.
The following statement returns the ACheckBox Name:
schk1Name = chk1.Name
All controls and most classes.
Caption, Description, Tag, Text, Variable Naming Conventions