TX Text Control .NET for Windows Forms

Item Property

Property|Introduced in 30.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets the comment with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the CommentCollection class.

Syntax

public CommentedText this[int number] { get; }

Examples

The following example works with comments in the current document by using CommentCollection.Item.

CommentCollection commentCollection = textControl.Comments;
textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
commentCollection.Add(new CommentedText("Verify the payment term."));

Console.WriteLine($"Item: {commentCollection[10]}");
Console.WriteLine("Comment Collection is ready for use.");

Limitations

Read only.