OBJECT_TYPE()

OBJECT_TYPE(N)

RETURNS THE TYPE OF THE SYSTEM OBJECT NUMBER N

  • Type: Function
  • Parameter: 1
  • Group: System Objects

ACTION

The fonction OBJECT_TYPE(N) returns the type of the system object number N.

The type of a system object is coded as follows:

1=SCENE3D

2=BUTTON

3=EDIT

4=MEMO

5=COMBO

6=ALPHA

7=FORM

8=LIST

9=PICTURE

10=CHECK

11=OPTION

12=MAIN_MENU

13=SUB_MENU

14=SOUND

15=MOVIE

16=TRACK_BAR

17=OPEN_DIALOG

18=SAVE_DIALOG

19=SCROLL_BAR

20=PROGRESS_BAR

21=SPIN

22=GRID

23=CONTAINER

26=DLIST

27=SCENE2D

28=TIMER

32=CONTAINER_OPTION

41=IMAGE

The function OBJECT_TYPE(N) returns -1 if the system object number N does not exist.

SYNTAX: Result=OBJECT_TYPE(N)

  • N = system object number (integer or real).

USE

  • The function OBJECT_TYPE() is used to know the type of a system object.

ERROR

  • If number N is not a correct expression.

EXAMPLE

rem create a button object

button 1

rem display its type as title

caption 0, object_type(1)

SEE ALSO

ALPHA

BUTTON

CHECK

COMBO

CONTAINER

CONTAINER_OPTION

DLIST

EDIT

FORM

GRID

IMAGE

LIST

MAIN_MENU

MEMO

MOVIE

OPEN_DIALOG

OPTION

PICTURE

PROGRESS_BAR

SAVE_DIALOG

SCENE2D

SCENE3D

SCROLL_BAR

SOUND

SPIN

SUB_MENU

TIMER

TRACK_BAR