grid function
Every grid is created, operated, and destroyed by its grid function. Each grid function is responsible for every grid of its grid type. Grid functions give each grid type its individual characteristics.

You'll probably never write a grid function. Grid functions are provided with GuiDesigner for popular grids, and GuiDesigner will create grid functions for other purposes from design windows you develop interactively and graphically. But you may want to modify the grid functions GuiDesigner creates for you - to make your custom windows and grids resizable, or to give special purpose behavior to the new grid types you developed.

Grid functions are usually declared and defined as follows:

DECLARE FUNCTION Name ( grid, message, v0, v1, v2, v3, kid, ANY )
FUNCTION Name (grid, message, v0, v1, v2, v3, kid, (r1, r1$, r1$[]))

Grid functions typically ignore dozens of grid messages, and process dozens of others. The character of each grid type is determined by which messages its grid function ignores, and what it does to process the messages it recognizes. To ignore messages, grid functions simply return.

To process most messages, grid functions call standard message processing functions provided with GuiDesigner. The standard message processing functions look like message names with an Xui prefix, for example XuiGetBorder(), XuiGetColor(), XuiSetTextString(), XuiRedrawGrid() etc.

To process messages in a way not supported by standard functions, grid functions either execute a custom message processing subroutine within the grid function, or call a non-standard message processing function written to perform the new activity.

Grid functions ignore messages containing invalid grid or message arguments, and attempt to ignore messages containing other invalid arguments, though some are difficult to detect.