CHECKED_MENU

CHECKED_MENU N,D

FILLS THE DLIST NUMBER D WITH THE NUMBERS OF SELECTED SUB_MENU IN TO OBJECT NUMBER N

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

ACTION

The command CHECKED_MENU N,D clears then fills the DLIST number D with the object numbers of the selected SUB_MENUs in the object number N.

The object number N is a MAIN_MENU or a SUB_MENU.

If no SUB_MENU is selected, the DLIST number D is empty.

SYNTAX: CHECKED_MENU N,D

  • N or D = 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 CHECKED_MENU is used to know which sub-menus have been selected by the user.
  • If COUNT(D) is zero, no sub-menu is selected.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If the system object number N does not exist.
  • If the object number N is not of type : MAIN_MENU, SUB_MENU.
  • If number D is not a correct expression.
  • If number D exceeds the allowed maximum number of system objects.
  • If number D is less than 0.
  • If the system object number D does not exist.
  • If the object number D is not of type : DLIST.

EXAMPLE

dim i%

main_menu 1

sub_menu 2 : parent 2,1 : caption 2,"Paramètres"

sub_menu 3 : parent 3,2 : caption 3,"aaaaaaa"

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

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

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

mark_on 4

mark_on 5

dlist 99

checked_menu 2,99

if count(99)<>0

for i%=1 to count(99):print item_read$(99,i%):next i%

end_if

SEE ALSO

MAIN_MENU

SUB_MENU

DLIST