RMC_AddGrid function.
Add a grid to a region of an existing chart

Syntax
nResult (LONG) = RMC_AddGrid(
ByVal nCtrlId (LONG),
ByVal nRegion (LONG),
Optional ByVal nBackColor (LONG),
Optional ByVal nAsGradient (LONG),
Optional ByVal nLeft (LONG),
Optional ByVal nTop (LONG),
Optional ByVal nWidth (LONG),
Optional ByVal nHeight (LONG),
Optional ByVal nBiColor (LONG)
)
Parameter
nCtrlId (LONG)
Unique ID of the chart control, to which the grid belongs.
nRegion (LONG)
Region to which the grid belongs.
nBackColor (LONG)
BackColor of the grid as a Color... constant. If omitted or 0, ColorWhiteSmoke.
nAsGradient (LONG)
If TRUE, the rear wall of the grid will be painted with a gradient effect. If omitted or 0: FALSE.
nLeft (LONG)
Upper left corner of the grid within the chart in pixel. If omitted: see Remarks
nTop (LONG)
Top corner of the grid within the chart in pixel. If omitted: see Remarks
nWidth (LONG)
Width of the grid in pixel. If omitted: see Remarks
nHeight (LONG)
Height of the grid in pixel. If omitted: see Remarks
nBicolor (LONG)
If RMC_BICOLOR_DATAAXIS, every second row/column of the data axis, if RMC_BICOLOR_LABELAXIS every second row/column of the label axis, if RMC_BICOLOR_BOTH every second row and column will have a slightly darker color than that one choosen for parameter nBackColor. You could use this drawing mode instead of (and of course in combination with) the grid lines for the rows or columns.
Return value
0
No error, function succeeded.
RMC_ERROR_CTRLID
Wrong control ID (0 or no chart with this control ID was found).
RMC_ERROR_MAXREGION
The region index exceeds the maximum possible numbers of regions (6) within a chart control.
RMC_ERROR_WRONGREGION
The region index is inexistent in the chart control.
Remarks
Normally there is no need to define the grid's Left, Top, Width and Height. RMChart calculates the boundary of the grid, if these paramteres are omitted, depending of the region's size, the caption's and the legend's size, the size of the axis labels and so on. This should be the preferred way because it assures that everything fits together.

The only reason to set these values may be if you design a chart with e.g. 2 regions on top of each other and you want to assure that the left corners and the width of both grids are congruent. Load file 2 regions.rmc into RMCDesigner for an example for this case.