RemoveByIndex
TabStopCollection.RemoveByIndex method
Entfernt einen Tabulatorstopp am angegebenen Index aus der Auflistung.
public void RemoveByIndex(int index)
Parameter | Typ | Beschreibung |
---|---|---|
index | Int32 | Ein Index in der Sammlung von Tabstopps. |
Beispiele
Zeigt, wie Sie einen Tabulator in einem Dokument anhand seines Index auswählen und entfernen.
Document doc = new Document();
TabStopCollection tabStops = doc.FirstSection.Body.Paragraphs[0].ParagraphFormat.TabStops;
tabStops.Add(ConvertUtil.MillimeterToPoint(30), TabAlignment.Left, TabLeader.Dashes);
tabStops.Add(ConvertUtil.MillimeterToPoint(60), TabAlignment.Left, TabLeader.Dashes);
Assert.AreEqual(2, tabStops.Count);
// Den ersten Tabulator entfernen.
tabStops.RemoveByIndex(0);
Assert.AreEqual(1, tabStops.Count);
doc.Save(ArtifactsDir + "TabStopCollection.RemoveByIndex.docx");
Siehe auch
- class TabStopCollection
- namensraum Aspose.Words
- Montage Aspose.Words