SetShd
Specifies the shading which shall be applied to the extents of the current table cell.
Syntax
expression.SetShd(sType, r, g, b);
expression
- A variable that represents a ApiTableCell class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sType | Required | ShdType | ApiFill | The shading type applied to the contents of the current table. Can be ShdType or ApiFill. | |
r | Required | byte | Red color component value. | |
g | Required | byte | Green color component value. | |
b | Required | byte | Blue color component value. |
Returns
This method doesn't return any data.
Example
This example specifies the shading which shall be applied to the extents of the current table cell.
- Code
- Result
// How to set shading fill to the cell.
// Create table and set its cell shading color.
const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const table = Api.CreateTable(2, 4);
const row = table.GetRow(0);
const cell = row.GetCell(0);
const fill = Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51));
cell.SetShd(fill);
slide.RemoveAllObjects();
slide.AddObject(table);