removeByIndex method

removeByIndex(index)

Removes a tab stop at the specified index from the collection.

removeByIndex(index: number)
ParameterTypeDescription
indexnumberAn index into the collection of tab stops.

Examples

Shows how to select a tab stop in a document by its index and remove it.

let doc = new aw.Document();
let tabStops = doc.firstSection.body.paragraphs.at(0).paragraphFormat.tabStops;

tabStops.add(aw.ConvertUtil.millimeterToPoint(30), aw.TabAlignment.Left, aw.TabLeader.Dashes);
tabStops.add(aw.ConvertUtil.millimeterToPoint(60), aw.TabAlignment.Left, aw.TabLeader.Dashes);

expect(tabStops.count).toEqual(2);

// Remove the first tab stop.
tabStops.removeByIndex(0);

expect(tabStops.count).toEqual(1);

doc.save(base.artifactsDir + "TabStopCollection.removeByIndex.docx");

See Also