Common Properties

TITLE

Grids do not have titles

VALUE

A grid does not have a (single) value. You can set or inquire the contents of each cell using the CELL-DATA property. You can also retrieve an entire record at once with the RECORD-DATA property.

SIZE

The SIZE of a grid is the number of characters across that you want to be visible in the grid. This is measured using the grid's default font. The LINES of a grid is the number of rows you want to be visible. Note that this is not the same as the number of records in the case where a record occupies more than one row. Normally, you should ensure that the LINES setting of a grid is an even multiple of the number of rows per record.

Space is added as needed to accommodate the grid's scroll bars and any border or grid lines

COLOR

Grids will use any specified foreground or background color. If either color is omitted, that color uses a system-dependent default value. Under Microsoft Windows, the default values are determined by the settings defined by the user in the Control Panel (usually black on bright-white). Note that the grid's color is its default color. You can override this default for a specific row, column, or cell by using various special properties (see ROW-COLOR, COLUMN-COLOR, CELL-COLOR, CURSOR-COLOR, HEADING-COLOR and ROW-COLOR-PATTERN). The grid uses a priority rule for determining which color to use when several are specified for a cell (for example, a cell that has a ROW-COLOR and a different COLUMN-COLOR specified for it). This is discussed in detail in theintroduction to the grid above.

EVENT-LIST, EXCLUDE-EVENT-LIST

EVENT-LIST is an exclusive list of events that are either sent to or withheld (blocked) from the program depending on the value of EXCLUDE-EVENT-LIST. See Common Screen Options for more information.

STYLES

3-D Displays 3-D shading around the border of the control.
ADJUSTABLE-COLUMNS Allows the user to change the size of the columns by dragging the column dividers with the mouse. The grid must have only one row per record for this style to have any effect. When the grid has column headers, the user will be able to change the column widths only by dragging the header dividers (this is to reduce the likelihood of the user accidentally changing a column's width when just clicking on a cell). If the grid does not have column headers, the user can drag any part of the divider.

The minimum column size is 1. The maximum is the visible portion of the grid. If the grid allows for horizontal scrolling, the VIRTUAL-WIDTH property will change as the user changes column sizes. When the user changes a column size, your program will be informed via a MSG-COL-WIDTH-CHANGED message. Because grids use integer character widths for measuring columns, the user will not be able to place the column divider at just any pixel location. The grid will adjust the location given by the user to the nearest character position

Note: Single column grids are not adjustable (the column already occupies all of the grid's display space). If a single column grid has the ADJUSTABLE-COLUMNS property, the column may appear to be adjustable, but when the user releases the mouse after dragging to change the width, the column will return to its original width.
BOXED Displays a border around the grid. If neither BOXED nor NO-BOX is specified, the default is machine-dependent. Under Windows, a box is displayed.
CENTERED-HEADINGS Draws column headings centered, regardless of the alignment of the rest of the column. If this is not specified, the column headings match the alignment of the corresponding column. Note that the alignment of row headings is specified as the first entry in the ALIGNMENT property, so there is no need for any special row heading alignment styles.
COLUMN-HEADINGS Causes the first record to be treated as column headers. See the discussion on headers above for details.
HSCROLL Specifies a horizontally scrolling grid. A grid with this style may not specify more than one row per record (for more information, see the DISPLAY-COLUMNS special property).
NO-BOX Causes the grid to display without a surrounding border. See the BOXED property.
NO-CELL-DRAG Prevents the user from dragging a cell in a grid control. You can configure NO-CELL-DRAG style to be the default setting for grid controls by setting the GRID_NO_CELL_DRAG configuration variable to 1 (on, true, yes). The default value is 0 (off, false, no) and will enable the user to drag a cell in a grid control.
PAGED Makes the grid a "paged" grid. Paged grids are typically used when the number of records in the grid is too many for a normal grid. When you set this style for a grid that contains data, records above the first visible record and records after the last visible record are deleted. See Paged Grids for a complete description of paged grids.
ROW-HEADINGS Treats the first column of each record as a row header. Note that this is typically useful only when you have one record per row. See the discussion on headers above for more details.
TILED-HEADINGS Draws the headings with some shading that causes the headings to look like tiles. This gives a light 3-D look to the grid. This style is effective only if the background color for the heading cells is low-intensity and not black. This looks best if you set the heading's background color to low-intensity white (that is, gray) and set the heading's divider color to black. Using the constants found in the COPY library acucobol.def, you can most easily specify this with:
HEADING-COLOR = BCKGRND-WHITE, 
HEADING-DIVIDER-COLOR = BLACK
USE-TAB Causes the grid to use the Tab and Backtab keys as navigation keys within the grid. Without this style, the Tab and Backtab keys move between the grid and other controls in the grid's window.
VSCROLL Specifies a vertical scroll bar for the grid. Grids without vertical scroll bars may still contain more records than seen on the screen, and the user can still reach these records using the keyboard. The usual reason for creating a grid without a vertical scroll bar is if you are going to limit the number of records to an amount that fits on the screen (see NUM-ROWS below).