GRID_Y_TO_ROW()

GRID_Y_TO_ROW(N,Y)

RETURNS THE ROW NUMBER OF THE GRID NUMBER N FROM THE COORDINATE Y

  • Type: Function
  • Parameters: 3
  • Group: System Objects

ACTION

The function GRID_Y_TO_ROW(N,Y) returns the line number of GRID number N from the coordinate Y.

SYNTAX: GRID_Y_TO_ROW(N,Y)

  • 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.
  • Y = coordinate (integer or real) in the system object GRID.

USE

  • The function GRID_Y_TO_ROW() is used to know the row from the coordinate Y in a GRID.

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 not the number of a system object : GRID.
  • If value Y is less than 0.
  • If value Y is not a correct expression.

EXAMPLE

label col

caption 0,"CLICK IN A CELL"

grid 1:width 1,400:height 1,200

on_click 1,col

end

col:

caption 0,"row = " + str$(grid_y_to_row(1,mouse_y_position(1)))+" column = " + str$(grid_x_to_column(1,mouse_x_position(1)))

return

SEE ALSO

GRID

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()