SetControlsHighlight
Sets the highlight to the content controls from the current document.
Syntax
expression.SetControlsHighlight(color);
expression - A variable that represents a ApiDocument class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| color | Required | ApiColor | The highlight color for the content controls. |
Returns
boolean
Example
This example sets the highlight to the content controls from the document.
// How to highlight thw controls with rose color.
// Add elements to the document and color their background.
let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
blockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control.");
doc.AddElement(0, blockLvlSdt);
doc.SetControlsHighlight(Api.HexColor('#FF6F3D'));