ON_RESIZE

ON_RESIZE N,L

EXECUTES THE PROGRAM FROM LABEL L WHEN THE USER RESIZES THE FORM NUMBER N

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

ACTION

The command ON_RESIZE N,L assigns a label (which must be defined in the program) from which the program will run every time the user resizes the FORM designated by the number N.

SYNTAX: ON_RESIZE N,L

  • 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.
  • L = Label.

USE

  • The command ON_RESIZE is used to associate an event (RESIZE) happening to a FORM, 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 : FORM.
  • If the label L does not exist.
  • If L is not a correct label name.

EXAMPLE

label resize

dim c%

caption 0,"Resize FORM0 with mouse"

on_resize 0, resize

end

resize:

c%=c%+1

caption 0,"resized "+str$(c%)+" times"

return

SEE ALSO

OFF_RESIZE