Skip to content

Object_Label - cObject

Returns the short name of an object

Type: Property
Access: Read-Only
Data Type: String
Parameters: None

Syntax

Property String Object_Label
Access Type Syntax
Read Access: Get Object_Label to StringVariable

Description

Object_Label returns the short name of the object using the Name property. The short name consists of the name used to create the object and does not include parent names.

If you are creating objects dynamically, use the CreateNamed method to assign an Object_Label to the dynamic object.

This method is often useful when debugging an application.

Object oMyName is a cObject 
End_Object

Get Object_Label of oMyName to sName
showln "The short name is " sName // this should show "The short name is OMYNAME"

This allows you to determine which object has he focus.

Get Focus of Desktop to hoFocus
Get Object_Label of hoFocus to sName
showln "The focus is currently at " sName

See Also

Object_Id | ObjectClass | IsObjectOfClass | ClassSuperClass | IsClassOfClass