Saltar para o conteúdo principal
Versão: Próximo

OBJECT Get type

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

ParâmetroTipoDescrição
*OperadorSe especificado, objeto é um nome de objeto (cadeia) Se omitido, objeto é uma variável
objectanyNome de objeto (se especificado *) ou Variável (se omitido *)
ResultadoIntegerTipo de objeto

Descrição

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

Exemplo

Você quer carregar um formulário e obter a lista de todos os objetos dos list boxes que contém.

 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

Ver também

FORM LOAD
LISTBOX GET OBJECTS

Propriedades

Número do comando1300
Thread-seguro