windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-b17efe55.md
Gets or sets a comment selected in the active worksheet.
Namespace : DevExpress.XtraSpreadsheet
Assembly : DevExpress.XtraSpreadsheet.v25.2.dll
NuGet Package : DevExpress.Win.Spreadsheet
[Browsable(false)]
public Comment SelectedComment { get; set; }
<Browsable(False)>
Public Property SelectedComment As Comment
| Type | Description |
|---|---|
| Comment |
A Comment object, or null ( Nothing in VB) if a comment is not selected.
|
To select a comment in a specific worksheet of the document loaded in the SpreadsheetControl, use the Worksheet.SelectedComment property of the corresponding worksheet object.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedComment 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.
{
if (spreadsheetControl.SelectedShape != null || spreadsheetControl.SelectedComment != null)
{
Private Sub spreadsheetControl1_SelectionChanged(ByVal sender As Object, ByVal e As EventArgs)
If spreadsheetControl.SelectedShape IsNot Nothing OrElse spreadsheetControl.SelectedComment IsNot Nothing Then
biFormatPainter.Enabled = False
See Also