GetPositionByIndex
TabStopCollection.GetPositionByIndex method
Ruft die Position (in Punkten) des Tabulatorstopps am angegebenen Index ab.
public double GetPositionByIndex(int index)
Parameter | Typ | Beschreibung |
---|---|---|
index | Int32 | Ein Index in der Sammlung von Tabstopps. |
Rückgabewert
Die Position des Tabstopps.
Beispiele
Zeigt, wie Sie eine Registerkarte finden, an ihrem Index anhalten und ihre Position überprüfen.
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);
// Überprüfen Sie die Position des zweiten Tabulatorstopps in der Sammlung.
Assert.AreEqual(ConvertUtil.MillimeterToPoint(60), tabStops.GetPositionByIndex(1), 0.1d);
Siehe auch
- class TabStopCollection
- namensraum Aspose.Words
- Montage Aspose.Words