ON_DOUBLE_CLICK

ON_DOUBLE_CLICK N,L

EXECUTES THE PROGRAM FROM LABEL L WHEN THE SYSTEM OBJECT NUMBER N IS DOUBLE-CLICKED

  • Type: Command
  • Parameters: 2
  • Group: Events

ACTION

The command ON_DOUBLE_CLICK N,L assigns a label (which must be defined in the program) from which the program will run every time the user double-clicks on the system object designated by the number N.

The system object must be one of the following types: SCENE3D, EDIT, MEMO, COMBO, ALPHA, FORM, LIST, PICTURE, OPTION, SPIN, GRID, CONTAINER.

SYNTAX: ON_DOUBLE_CLICK N,L

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

USE

  • The command ON_DOUBLE_CLICK is used to associate an event (DOUBLE 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 executed.

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, EDIT, MEMO, COMBO, ALPHA, FORM, LIST, PICTURE, OPTION, SPIN, GRID, CONTAINER.
  • If the label L does not exist.
  • If L is not a correct label name.

EXAMPLE

label col

dim c%

c%=3

edit 1

top 1,60

width 1,200

text 1,"double-click on me "+str$(c%)+" times"

on_double_click 1, col

end

col:

text 1,"double-clicked"

wait 250

c%=C%-1

text 1,"double-click on me "+str$(c%)+" times"

if c%=0

off_double_click 1

text 1,"double-click is inactive"

end_if

return

SEE ALSO

OFF_DOUBLE_CLICK

DOUBLE_CLICKED()

NUMBER_DOUBLE_CLICK