SetBorderColor
Sets the border color to the current content control.
Syntax
expression.SetBorderColor(r, g, b, a);
expression - A variable that represents a ApiInlineLvlSdt 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 container.
- Code
- Result
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let inlineLvlSdt = Api.CreateInlineLvlSdt();
let run = Api.CreateRun();
run.AddText("This is an inline text content control with blue border.");
inlineLvlSdt.AddElement(run, 0);
inlineLvlSdt.SetBorderColor(0, 0, 255, 255);
paragraph.AddInlineLvlSdt(inlineLvlSdt);