GRID

GRID N

CREATES A SYSTEM OBJECT GRID AND ALLOCATES IT NUMBER N AS REFERENCE

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

ACTION

The command GRID N creates a system object GRID, and allocates it a number N. The number N will be used to designate this GRID.

The created GRID can then be used through the appropriated commands.

The GRID is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 320 pixels and HEIGHT = 120 pixels.

The GRID is created with 5 columns, 5 rows, 1 fixed column (in gray color) and 1 fixed row (in gray color).

The rows have a height of 24 pixels.

The columns have a width of 64 pixels.

A GRID is a table of cells organized in row and colums. We can read (GRID_READ$) and write (GRID_WRITE) in the cells. The cell of the upper left corner is called (1,1).

A GRID takes automatically horizontal and vertical scrollbars.

A GRID can generate the events : ON_CLICK, ON_DOUBLE_CLICK.

Remark: by default, the GRID 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 GRID.

SYNTAX: GRID 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

  • A GRID is used to handle a table of clells.

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 or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

rem create a GRID with its default position and dimensions

grid 1

rem change its size (its number is used as reference)

width 1,500

height 1,180

rem set 6 rows

grid_row 1,6

rem with 2 fixed rows

grid_row_fixed 1,2

rem height of the rows

grid_row_height 1,45

rem set 7 columns

grid_column 1,7

rem with 2 fixed columns

grid_column_fixed 1,2

rem width of columns

grid_column_width 1,100

SEE ALSO

TOP

LEFT

WIDTH

HEIGHT

HINT

HINT_HIDE

FULL_SPACE

GRID_CLEAR

GRID_COLUMN

GRID_COLUMN()

GRID_COLUMN_DELETE

GRID_COLUMN_FIXED

GRID_COLUMN_FIXED()

GRID_COLUMN_INSERT

GRID_COLUMN_SIZING_OFF

GRID_COLUMN_SIZING_ON

GRID_COLUMN_WIDTH

GRID_COLUMN_WIDTH()

GRID_FIXED_COLOR

GRID_LOAD

GRID_ONE_COLUMN_WIDTH

GRID_ONE_COLUMN_WIDTH()

GRID_ONE_ROW_HEIGHT

GRID_ONE_ROW_HEIGHT()

GRID_READ$()

GRID_ROW

GRID_ROW()

GRID_ROW_DELETE

GRID_ROW_FIXED

GRID_ROW_FIXED()

GRID_ROW_HEIGHT

GRID_ROW_HEIGHT()

GRID_ROW_INSERT

GRID_ROW_SIZING_OFF

GRID_ROW_SIZING_ON

GRID_SAVE

GRID_WRITE

GRID_X_TO_COLUMN()

GRID_Y_TO_ROW()

ON_CLICK

ON_DOUBLE_CLICK