Skip to main content
Version: 20 R7 BETA

OBJECT Get type

OBJECT Get type ( {* ;} object ) : Integer

ParameterTypeDescription
*OperatorIf specified, object is an object name (string)
If omitted, object is a variable
objectanyObject name (if * is specified) or Variable (if * is omitted)
Function resultIntegerType of object

Description

The OBJECT Get type command returns the type of the object designated by the object and * parameters in the current form.

Passing the optional * parameter indicates that the object parameter is an object name (string). This syntax is mandatory if you are processing static objects such as lines or rectangles.
If you do not pass this parameter, it indicates that the object parameter is a variable. In this case, you pass a variable reference instead of a string.

Note: If you apply this command to a set of objects, the type of the last object is returned.

The value returned corresponds to one of the following constants, available in the "Form Object Types" theme:

ConstantTypeValue
Object type 3D buttonInteger16
Object type 3D checkboxInteger26
Object type 3D radio buttonInteger23
Object type button gridInteger20
Object type checkboxInteger25
Object type comboboxInteger11
Object type dialInteger28
Object type groupInteger21
Object type groupboxInteger30
Object type hierarchical listInteger6
Object type hierarchical popup menuInteger13
Object type highlight buttonInteger17
Object type invisible buttonInteger18
Object type lineInteger32
Object type listboxInteger7
Object type listbox columnInteger9
Object type listbox footerInteger10
Object type listbox headerInteger8
Object type matrixInteger35
Object type ovalInteger34
Object type picture buttonInteger19
Object type picture inputInteger4
Object type picture popup menuInteger14
Object type picture radio buttonInteger24
Object type plugin areaInteger38
Object type popup dropdown listInteger12
Object type progress indicatorInteger27
Object type push buttonInteger15
Object type radio buttonInteger22
Object type radio button fieldInteger5
Object type rectangleInteger31
Object type rounded rectangleInteger33
Object type rulerInteger29
Object type splitterInteger36
Object type static pictureInteger2
Object type static textInteger1
Object type subformInteger39
Object type tab controlInteger37
Object type text inputInteger3
Object type unknownInteger0
Object type view pro areaInteger42
Object type web areaInteger40
Object type write pro areaInteger41

Example

You want to load a form and get a list of all the objects of list boxes that it contains.

 FORM LOAD("MyForm")
 ARRAY TEXT(arrObjects;0)
 FORM GET OBJECTS(arrObjects)
 ARRAY LONGINT(ar_type;Size of array(arrObjects))
 For($i;1;Size of array(arrObjects))
    ar_type{$i}:=OBJECT Get type(*;arrObjects{$i})
    If(ar_type{$i}=Object type listbox)
       ARRAY TEXT(arrLBObjects;0)
       LISTBOX GET OBJECTS(*;arrObjects{$i};arrLBObjects)
    End if
 End for
 FORM UNLOAD

See also

FORM LOAD
LISTBOX GET OBJECTS

Properties

Command number1300
Thread safe