TabStopCollectionRemoveByIndex Method

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

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void RemoveByIndex(
	int index
)

Parameters

index
Type: SystemInt32
An index into the collection of tab stops.
Examples
Shows how to select a tab stop in a document by its index and remove it.
Document doc = new Document(MyDir + "Document.docx");
Paragraph paragraph = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true);

paragraph.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(30), TabAlignment.Left,
    TabLeader.Dashes);
paragraph.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(60), TabAlignment.Left,
    TabLeader.Dashes);

// Tab stop placed at 30 mm is removed
paragraph.ParagraphFormat.TabStops.RemoveByIndex(0);

Console.WriteLine(paragraph.ParagraphFormat.TabStops.Count);

doc.Save(ArtifactsDir + "TabStopCollection.RemoveByIndex.doc");
See Also