SetBorderColor
Sets the border color to the current content control.
Syntax
expression.SetBorderColor(r, g, b, a);
expression
- A variable that represents a ApiBlockLvlSdt class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
r | Required | byte | Red color component value. | |
g | Required | byte | Green color component value. | |
b | Required | byte | Blue color component value. | |
a | Required | byte | Alpha color component value. |
Returns
boolean
Example
This example shows how to set the border color for the block-level container.
- Code
- Result
let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
blockLvlSdt.SetBorderColor(0, 0, 255, 255);
blockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control with blue border.");
doc.AddElement(0, blockLvlSdt);