+1 888 340 6572

RectangleSetColor

From MultiCharts

Assigns the specified color to a rectangle with the specified ID number; returns a value of 0 if the color was successfully assigned, and a value of -2 if the specified rectangle ID number is invalid.

Usage

RectangleSetColor(ID,Color)
Parameters
ID - a numerical expression specifying the rectangle ID number
Color - an expression specifying the rectangle color
Rectangle color can be specified by a numerical expression representing an RGB color number or a legacy color value, or by one of 17 base color words.

Notes

A rectangle-specific ID number is returned by RectangleNew when the rectangle is created.

Example

Assign the color blue to the rectangle with an ID number of 1:

Value1=RectangleSetColor(1,Blue);

Assign the RGB color 2138336 (Orange) to the rectangle with an ID number of 2:

Value1=RectangleSetColor(2,2138336);

Assign the legacy color 4 (Green) to the rectangle with an ID number of 3:

[LegacyColorValue=True];
Value1=RectangleSetColor(3,4);