Name Property (Visual FoxPro)

Specifies the name used to reference an object in code. Available at design time; read/write at run time.


Object.Name[ = cName]

cName

Specifies the name used to reference the object in code.

Applies To: CheckBox Control | Collection Class | Column Object | ComboBox Control | CommandButton Control | CommandGroup Control | Container Object | Control Object (Visual FoxPro) | Cursor Object | CursorAdapter Class | Custom Object | DataEnvironment Object | EditBox Control | Exception Class (Visual FoxPro) | File Object (Visual FoxPro) | Form Object | FormSet Object | Grid Control | Header Object | Image Control (Visual FoxPro) | Label Control (Visual FoxPro) | Line Control | ListBox Control | OLE Bound Control | OLE Container Control | OptionButton Control | OptionGroup Control | Page Object | PageFrame Control | Project Object (Visual FoxPro) | ProjectHook Object | Relation Object | ReportListener Object | _SCREEN System Variable | Session Object | Shape Control | Spinner Control | TextBox Control (Visual FoxPro) | Timer Control | ToolBar Object

The default name for new objects is the type of object plus a unique integer. For example, the first new Form object is Form1, and the third text box you create on a Form is Text3.

NoteNote

If the object is the first object in the object hierarchy (that is, the outermost container object), use the object variable to reference the object instead of the Name property.

For a Project object, the Name property contains the name and path to the project, and is read-only at design time and run time.

For a File object, the Name property contains the name and path to the file, and is read-only at design time and run time.

Community Additions

ADD
Show: