Skip to main content

SetBorderColor

Sets the border color to the current content control.

Syntax

expression.SetBorderColor(color);

expression - A variable that represents a ApiBlockLvlSdt class.

Parameters

NameRequired/OptionalData typeDefaultDescription
colorOptionalApiColorThe border color.

Returns

boolean

Example

This example shows how to set the border color for the block-level container.

let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
blockLvlSdt.SetBorderColor(Api.HexColor('#0000FF'));
blockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control with blue border.");
doc.AddElement(0, blockLvlSdt);