Back to Devexpress

CommentRun.Text Property

officefileapi-devexpress-dot-spreadsheet-dot-commentrun.md

latest3.4 KB
Original Source

CommentRun.Text Property

Gets or sets the text of the current run.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
string Text { get; set; }
vb
Property Text As String

Property Value

TypeDescription
String

The region of the comment text.

|

Remarks

Use the CommentRun.Font property to specify the font for displaying the current text region within the comment.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Text property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheetcontrol-api-part-1/CS/SpreadsheetControl_WPF_API/SpreadsheetActions/CellActions.cs#L457

csharp
CommentRunCollection commentRunsE2 = commentE2.Runs;
commentRunsE2[1].Text = "This comment is copied from the cell " + commentedCell.GetReferenceA1();
#endregion #AddComment

winforms-spreadsheetcontrol-api-part1/VB/SpreadsheetControl/SpreadsheetActions/CellActions.vb#L453

vb
Dim commentRunsE2 As CommentRunCollection = commentE2.Runs
commentRunsE2(1).Text = "This comment is copied from the cell " & commentedCell.GetReferenceA1()
' #End Region ' #AddComment

wpf-spreadsheetcontrol-api-part-1/VB/SpreadsheetControl_WPF_API/SpreadsheetActions/CellActions.vb#L412

vb
Dim commentRunsE2 As CommentRunCollection = commentE2.Runs
commentRunsE2(1).Text = "This comment is copied from the cell " & commentedCell.GetReferenceA1()
' #End Region ' #AddComment

See Also

Threaded Comments in Spreadsheet Documents

How to: Add a Simple Note To a Spreadsheet Cell

CommentRun Interface

CommentRun Members

DevExpress.Spreadsheet Namespace