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

This method doesn't return any data.

Example

Apply shading color to a table in a presentation.

// Set the background shading for the entire table.

// Create a table, apply a shading color, and add it to the slide.

const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const table = Api.CreateTable(2, 4);
table.SetShd("clear", Api.HexColor('#FF6F3D'));
slide.RemoveAllObjects();
slide.AddObject(table);