Promotic
WikipediaLinkedInYoutubeTwitterFacebook

SetCellForeColor - method of the PmgWTable object

Description:
Sets text color of the cell (eventually the whole columns and rows).
Syntax:
Empty SetCellForeColor(Long Row, Long Col, String Value)
Parameters:
Row(Long) If the value is greater or equal 0 then it is a row index (zero-based index, counted including the fixed part).
Value -2 means the last row.
Value -3 sets the value to all rows (counted including the fixed part).
Col(Long) If the value is greater or equal 0 then it is a column index (zero-based index, counted including the fixed part).
Value -2 means the last column.
Value -3 sets the value to all columns (counted including the fixed part).
Value(String) The new value to be written.
Note:
RGB String (represents a color) is written in the form "#RRGGBB".

It is not possible to set the value -3 in both parameters Row and Col; if the value is set in one parameter, then cannot be used in the other.

 
This method is also functional in Web panels.
Example:
Sets the text color of the 2nd row
JavaScriptVBScriptSelect and copy to clipboard

var oTable = pMe.Items("/Table");
oTable.SetCellForeColor(1, -3, "#ff0000");  //Red
oTable.Draw();

History:
Pm8.02.00: Property CellForeColor is replaced by methods GetCellForeColor and SetCellForeColor.
PROMOTIC 9.0.13 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice