OFF_CLICK

OFF_CLICK N

IGNORES THE EVENT "CLICK" WHEN THE SYSTEM OBJECT NUMBER N IS CLICKED

  • Type: Command
  • Parameter: 1
  • Group: Events

ACTION

The command OFF_CLICK N ignores the event "click" when the user clicks on the system object designated by the number N.

Remark 1: the system object must be one of the following types: SCENE3D, BUTTON, EDIT, MEMO, COMBO, ALPHA, FORM, LIST, PICTURE, CHECK, OPTION, SUB_MENU, SCENE2D, SPIN, CONTAINER_OPTION.

Remark 2: the event subprogram is defined by the command ON_CLICK N,L which assigns the label L as the starting point of the event subprogram.

SYNTAX: OFF_CLICK 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 command OFF_CLICK is used to disassociate the event "click" happening to a system object, to a program location (defined by the label L).
  • When the event occurs, the program named by the label is not executed any more.

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 system object number N does not exist.
  • If system object number N is not of the type : SCENE3D, BUTTON, EDIT, MEMO, COMBO, ALPHA, FORM, LIST, PICTURE, CHECK, OPTION, SUB_MENU, SCENE2D, SPIN, CONTAINER_OPTION.

EXAMPLE

rem declare 2 labels

label click1,click2

rem a BUTTON is created

button 1:top 1,60:width 1,200

caption 1,"click 2 times"

rem every time the BUTTON is clicked, execute from label "click1"

on_click 1, click1

end: rem main program is finished

click1:

caption 1,"clicked for the first time"

wait 250

off_click 1

on_click 1, col2

return

click2:

caption 1,"clicked for the second time"

wait 250

terminate

return

SEE ALSO

ON_CLICK