SetBackgroundColor
function SetBackgroundColor(r: byte = null, g: byte = null, b: byte = null, bNone: boolean = null): boolean
Description
Sets the background color to all cells in the current table.
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);
oTable.SetBackgroundColor(255, 111, 61, false);
oDocument.Push(oTable);