Skip to main content

SetShd

Specifies the shading which shall be applied to the extents of the current table.

Syntax

expression.SetShd(sType, r, g, b);

expression - A variable that represents a ApiTable class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sTypeRequiredShdType | ApiFillThe shading type applied to the contents of the current table. Can be ShdType or ApiFill.
rRequiredbyteRed color component value.
gRequiredbyteGreen color component value.
bRequiredbyteBlue color component value.

Returns

boolean

Example

How to add a shading to the table background.

// Create a table, set its shading color and add it to the page.

const doc = Api.GetDocument();
const page = doc.GetPage(0);

const table = Api.CreateTable(2, 4);
table.SetShd("clear", 255, 111, 61);

page.AddObject(table);