Skip to main content

IsCheckBoxChecked

Determines whether a checkbox content control is currently checked or unchecked.

Throws: Error if the content control is not a checkbox.

Syntax

expression.IsCheckBoxChecked();

expression - A variable that represents a ApiInlineLvlSdt class.

Parameters

This method doesn't have any parameters.

Returns

boolean

Example

This example shows how to check state of a checkbox content control.

let doc = Api.GetDocument();
let checkBox = doc.AddCheckBoxContentControl();
let paragraph = Api.CreateParagraph();
doc.Push(paragraph);
let isChecked = checkBox.IsCheckBoxChecked();
paragraph.AddText("Checked: " + (isChecked ? "true" : "false"));