SET_FOCUS

SET_FOCUS N

GIVES THE FOCUS TO THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameter: 1
  • Group: System

ACTION

The command SET_FOCUS N gives the input focus to the system object designated by its number N. The system object receives then the keyboard events.

SYNTAX: SET_FOCUS 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 SET_FOCUS is used in order that a system object receives the keyboard data.

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 number N is a system object of the type : SCENE3D, ALPHA, PICTURE, MAIN_MENU, SUB_MENU, SOUND, OPEN_DIALOG, SAVE_DIALOG, LIST, TIMER, MAIN_MENU_POP, OPEN_DIALOG_PIC, SAVE_DIALOG_PIC, SHAPE, HVIEWER, SERIAL, LED1, DIGIT1, SWITCH1, IMAGE.

EXAMPLE

rem create a BUTTON

button 1:caption 1,"button1"

rem create another BUTTON

button 2:caption 2,"button2":left 2,100

rem wait for 1 second

wait 1000

rem set the focus to the first button

set_focus 1

rem wait for 1 second

wait 1000

rem set the focus to the second button

set_focus 2

SEE ALSO

-