| RMC_AddRegion function. | ||
| Add a region to an existing chart | ||
| Syntax | ||
| nResult (LONG) = RMC_AddRegion( ByVal nCtrlId (LONG), Optional ByVal nLeft (LONG), Optional ByVal nTop (LONG), Optional ByVal nWidth (LONG), Optional ByVal nHeight (LONG), Optional ByRef sFooter (ASCIIZ), Optional ByVal nShowBorder (LONG) ) |
||
| Parameter | ||
| nCtrlId (LONG) | ||
| Unique ID of the chart control, to which the region belongs. | ||
| nLeft (LONG) | ||
| Upper left corner of the region in the chart (in pixel). If omitted or 0: 1. | ||
| nTop (LONG) | ||
| Top corner of the region in the chart (in pixel). If omitted or 0: 1 pixel. | ||
| nWidth (LONG) | ||
| Width of the region (in pixel). If this value is negative, it defines the offset from the right border of the chart control. If omitted or 0: -1 | ||
| nHeight (LONG) | ||
| Height of the region (in pixel). If this value is negative, it defines the offset from the bottom of the chart control. If omitted or 0: -1 | ||
| sFooter (ASCIIZ) | ||
| Footer which will be printed at the region's bottom.
As default, the footer is printed in 7 point in the most lower, right edge of the region.
But you can set the font's size and weight and the alignment of the footer: add a backslash (\) at the end of the text,
followed by a number (for the font's size) and/or char b (for bold) and/or one of the chars "lcr" (for the
footer's alignment left, center or right). Example: "This is the footer\9bl" will print the text in 9 points, bold and left aligned. "This is the footer\c" will print it in in 7 point (default) center aligned. | ||
| nShowborder (LONG) | ||
| If TRUE, a border will be painted around the region. This can be usefull in design mode, when designing a chart with more then one region. If omitted or 0: FALSE (no border) | ||
| 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. | ||