SetShd
Specifies the shading which is applied to the extents of the current table.
Syntax
expression.SetShd(sType, r, g, b, isAuto);
expression
- A variable that represents a ApiTable class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sType | Required | ShdType | The shading type applied to the extents of the current table. | |
r | Required | byte | Red color component value. | |
g | Required | byte | Green color component value. | |
b | Required | byte | Blue color component value. | |
isAuto | Optional | boolean | false | The true value disables the SetShd method use. |
Returns
This method doesn't return any data.
Example
This example specifies the shading which shall be applied to the extents of the table.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("We added an orange shading to the table:");
let tableStyle = doc.CreateStyle("CustomTableStyle", "table");
tableStyle.SetBasedOn(doc.GetStyle("Bordered"));
let tablePr = tableStyle.GetTablePr();
let table = Api.CreateTable(3, 3);
tablePr.SetShd("clear", 255, 111, 61, false);
table.SetTableLook(true, true, true, true, false, false);
table.SetStyle(tableStyle);
doc.Push(table);