PARENT

PARENT N,M

SET THE SYSTEM OBJECT NUMBER M AS THE FATHER OF THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameters: 2
  • Group: System Objects

ACTION

The command PARENT N,M establishes a link between the system object designated by its number M and the system object designated by its number N.

The system object number M becomes the father of the system object number N : system object M contains then the system object N.

1 - A FORM can be the father of (can contain) several types of system objects

2 - A CONTAINER can be the father of (can contain) several types of system objects

3 - A PANEL can be the father of (can contain) several types of system objects

4 - A TAB can be the father of (can contain) several types of system objects

5 - A MAIN_MENU can be the father of one or several SUB_MENU

6 - A SUB_MENU can be the father of one or several SUB_MENU

7 - A CONTAINER_OPTION can be the father of one or several OPTION

8 - A CONTAINER_TAB can be the father of one or several TAB

SYNTAX: PARENT N,M

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • M = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The command PARENT is used to establish a hierarchical link between 2 system objects.
  • It is very useful to define a system of menu, or to place a system object on a FORM, a CONTAINER, a PANEL, a TAB or to group OPTIONs in a CONTAINER_OPTION.

ERROR

  • If N or M is not a correct expression.
  • If N or M exceeds the allowed maximum number of system objects.
  • If N or M is less than 0.
  • If system object number N or system object number M does not exist.
  • If it is impossible to link the system object number N to the system object number M.

EXAMPLE

rem creation of a menu

main_menu 1

rem create 2 SUB_MENU at the same level

sub_menu 2: caption 2,"File": parent 2,1

sub_menu 3: caption 3,"Edit": parent 3,1

rem create 3 SUB_MENU of SUB_MENU 2 (Files)

sub_menu 4: caption 4,"Open": parent 4,2

sub_menu 5: caption 5,"Save": parent 5,2

sub_menu 6: caption 6,"Quit": parent 6,2

rem create 3 SUB_MENU of SUB_MENU 3 (Edit)

sub_menu 7: caption 7,"Copy": parent 7,3

sub_menu 8: caption 8,"Paste": parent 8,3

sub_menu 9: caption 9,"Undo": parent 9,3

SEE ALSO

-