SetShd

function SetShd(sType: ShdType | ApiFill = null, r: byte = null, g: byte = null, b: byte = null): void

Description

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

Parameters

sTypeShdType | ApiFilldefault: null

The shading type applied to the contents of the current table. Can be ShdType or ApiFill.

rbytedefault: null

Red color component value.

gbytedefault: null

Green color component value.

bbytedefault: null

Blue color component value.

Returns

void

Try It

var oPresentation = Api.GetPresentation();
var oTable = Api.CreateTable(2, 4);
var oRow = oTable.GetRow(0);
var oCell = oRow.GetCell(0);
var oFill = Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51));
oCell.SetShd(oFill);
var oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oSlide.AddObject(oTable);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).