Sets an index to the content control list item in the combo box / dropdown list content control.
Name | Type | Description |
nIndex | number | An index of the content control list item. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); Api.pluginMethod_AddContentControlList(1, [{Display: "Item1_D", Value: "Item1_V"}, {Display: "Item2_D", Value: "Item2_V"}], {"Id": 100, "Tag": "CC_Tag", "Lock": 3}); var aContentControls = oDocument.GetAllContentControls(); var oContentControlList = aContentControls[0].GetDropdownList(); oDocument.AddElement(0, oContentControlList); var oItem = oContentControlList.GetItem(1); oItem.SetIndex(0); builder.SaveFile("docx", "SetIndex.docx"); builder.CloseFile();