SetBackgroundColor
function SetBackgroundColor(r: byte = null, g: byte = null, b: byte = null, bNone: boolean = null): boolean
Description
Sets the background color to the current table cell.
Parameters
Red color component value.
Green color component value.
Blue color component value.
- bNone
boolean
null Defines that background color will not be set.
Returns
boolean
Try It
var oDocument = Api.GetDocument();
var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"));
var oTable = Api.CreateTable(4, 2);
oTable.SetWidth("percent", 100);
oTable.SetStyle(oTableStyle);
var oCell = oTable.GetRow(0).GetCell(0);
oCell.SetBackgroundColor(255, 111, 61, false);
oDocument.Push(oTable);