CHECKED_OPTION()

CHECKED_OPTION(N)

RETURNS THE OBJECT NUMBER OF THE SELECTED OPTION IN THE CONTAINER_OPTION NUMBER N

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

ACTION

The function CHECKED_OPTION(N) returns the number of the selected OPTION in the CONTAINER_OPTION number N, and -1 if no OPTION is selected.

SYNTAX: Result=CHECKED_OPTION(N)

  • 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.

USE

  • The function CHECKED_OPTION() is used to know the number of OPTION selected by the user.

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 :: CONTAINER_OPTION.

EXAMPLE

label select

rem create a CONTAINER_OPTION with 4 OPTIONs

container_option 10

caption 10,"Select one OPTION"

option 50:parent 50,10:top 50,20:left 50,20:caption 50,"Option 50"

option 60:parent 60,10:top 60,40:left 60,20:caption 60,"Option 60"

option 65:parent 65,10:top 65,60:left 65,20:caption 65,"Option 65"

option 70:parent 70,10:top 70,80:left 70,20:caption 70,"Option 70"

on_click 50,select

on_click 60,select

on_click 65,select

on_click 70,select

end

select:

caption 0,str$(checked_option(10))+" is selected"

return

SEE ALSO

OPTION

CONTAINER_OPTION