Skip to content

Commit

Permalink
Merge pull request #62 from asposewords/romans91-new-examples
Browse files Browse the repository at this point in the history
Added GetPositionByIndex to ExTabStop.cs
  • Loading branch information
romans91 committed Jan 27, 2016
2 parents fc76d31 + add9123 commit 96d1969
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions QA Tests/AW Tests/Examples/Tab/ExTabStopCollection.cs
Expand Up @@ -70,5 +70,21 @@ public void RemoveByIndexEx()
doc.Save(ExDir + "Document.RemovedTabStopsByIndex Out.doc");
//ExEnd
}

[Test]
public void GetPositionByIndexEx()
{
//ExStart
//ExFor:TabStopCollection.GetPositionByIndex
//ExSummary:Shows how to find a tab by it's index and get its position.
Aspose.Words.Document doc = new Aspose.Words.Document(ExDir + "Document.doc");
Aspose.Words.Paragraph paragraph = (Aspose.Words.Paragraph)doc.GetChild(Aspose.Words.NodeType.Paragraph, 0, true);

paragraph.ParagraphFormat.TabStops.Add(85, Aspose.Words.TabAlignment.Left, Aspose.Words.TabLeader.Dashes);
paragraph.ParagraphFormat.TabStops.Add(170, Aspose.Words.TabAlignment.Left, Aspose.Words.TabLeader.Dashes);

Console.WriteLine(paragraph.ParagraphFormat.TabStops.GetPositionByIndex(1)); // 170
//ExEnd
}
}
}

0 comments on commit 96d1969

Please sign in to comment.