GRID_X_TO_COLUMN()

GRID_X_TO_COLUMN(N,X)

RETURNS THE COLUMN NUMBER OF THE GRID NUMBER N FROM THE COORDINATE X

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

ACTION

The function GRID_X_TO_COLUMN(N,X) returns the column number of GRID number N from the coordinate X.

SYNTAX: Result=GRID_X_TO_COLUMN(N,X)

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

USE

  • The function GRID_X_TO_COLUMN() is used to know a column from the coordinate X 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 X is less than 0.
  • If value X 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_Y_TO_ROW()