メインコンテンツまでスキップ
バージョン: 開発中

OBJECT Get type

OBJECT Get type ( {* ;} object ) -> 戻り値

引数説明
*演算子🡒指定時: object はオブジェクト名(文字列)、 省略時: object は変数またはフィールド
objectフォームオブジェクト🡒オブジェクト名( * 指定時)、または変数やフィールド( * 省略時)
戻り値倍長整数🡐オブジェクトのタイプ

説明

OBJECT Get typeコマンドは、カレントフォーム内の、引数 object* で指定したオブジェクトのタイプを返します。

任意の * 演算子を渡した場合、 object 引数でオブジェクト名を文字列で指定します。線や長方形といった静的なオブジェクトを処理する場合にはこの記法を用いなければなりません。省略時には object 引数でフィールドまたは変数を指定します。

注: このコマンドを複数のオブジェクトに対して適用した場合、最背面にあるオブジェクトのタイプが返されます。

返された値は "Form Object Types" テーマ内にある以下の定数と対応しています:

定数
Object type 3D button倍長整数16
Object type 3D checkbox倍長整数26
Object type 3D radio button倍長整数23
Object type button grid倍長整数20
Object type checkbox倍長整数25
Object type combobox倍長整数11
Object type dial倍長整数28
Object type group倍長整数21
Object type groupbox倍長整数30
Object type hierarchical list倍長整数6
Object type hierarchical popup menu倍長整数13
Object type highlight button倍長整数17
Object type invisible button倍長整数18
Object type line倍長整数32
Object type listbox倍長整数7
Object type listbox column倍長整数9
Object type listbox footer倍長整数10
Object type listbox header倍長整数8
Object type matrix倍長整数35
Object type oval倍長整数34
Object type picture button倍長整数19
Object type picture input倍長整数4
Object type picture popup menu倍長整数14
Object type picture radio button倍長整数24
Object type plugin area倍長整数38
Object type popup dropdown list倍長整数12
Object type progress indicator倍長整数27
Object type push button倍長整数15
Object type radio button倍長整数22
Object type radio button field倍長整数5
Object type rectangle倍長整数31
Object type rounded rectangle倍長整数33
Object type ruler倍長整数29
Object type splitter倍長整数36
Object type static picture倍長整数2
Object type static text倍長整数1
Object type subform倍長整数39
Object type tab control倍長整数37
Object type text input倍長整数3
Object type unknown倍長整数0
Object type view pro area倍長整数42
Object type web area倍長整数40
Object type write pro area倍長整数41

例題

フォームをロードし、そこに内包される全てのリストボックスオブジェクトの一覧を取得する場合:

 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

参照

FORM LOAD
LISTBOX GET OBJECTS