CREATES A SYSTEM OBJECT BUTTON_PICTURE AND ALLOCATES IT NUMBER N AS REFERENCE
ACTION
The command BUTTON_PICTURE N creates a system object BUTTON_PICTURE, and allocates it a number N. The number N will be used to designate the BUTTON_PICTURE.
The created BUTTON_PICTURE can then be used through the appropriated commands.
The BUTTON_PICTURE is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 75 pixels and HEIGHT = 25 pixels.
A BUTTON_PICTURE displays a picture (loaded by command FILE_LOAD or drawn by the 2D commands) and a text by CAPTION. It is a mean for the user to trigger an action.
A BUTTON_PICTURE can generate the events : ON_CLICK, ON_KEY_UP, ON_KEY_DOWN, ON_MOUSE_MOVE, ON_MOUSE_UP, ON_MOUSE_DOWN.
Remark: by default, the BUTTON_PICTURE is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the BUTTON_PICTURE.
SYNTAX:
BUTTON_PICTURE N
USE ERROR EXAMPLE
rem create a button_picture
button_picture 1
wait 1000
rem change the size of picture
button_picture_target_is_picture
height 1,80:width 1,80
rem draw a blue cross with red background
color 1,200,0,0
2d_target_is 1
2d_pen_width 2
2d_pen_color 0,0,200
2d_line 0,0,80,80
2d_line 0,80,80,0
rem give a text
caption 1,Text
wait 1000
rem change the size of object
button_picture_target_is_object
height 1,100:width 1,150
BUTTON_PICTURE
BUTTON_PICTURE N
SEE ALSO
CAPTION
FILE_LOAD
TOP
LEFT
WIDTH
HEIGHT
HINT
HINT_HIDE
FULL_SPACE
ON_CLICK
ON_KEY_UP
ON_KEY_DOWN