Back to Devexpress

SpreadsheetControl.SelectedComment Property

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-b17efe55.md

latest3.4 KB
Original Source

SpreadsheetControl.SelectedComment Property

Gets or sets a comment selected in the active worksheet.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
[Browsable(false)]
public Comment SelectedComment { get; set; }
vb
<Browsable(False)>
Public Property SelectedComment As Comment

Property Value

TypeDescription
Comment

A Comment object, or null ( Nothing in VB) if a comment is not selected.

|

Remarks

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.

winforms-spreadsheet-implement-microsoft-excel-format-painter/CS/WindowsFormsApplication1/FormatPainterProvider.cs#L83

csharp
{
    if (spreadsheetControl.SelectedShape != null || spreadsheetControl.SelectedComment != null)
    {

winforms-spreadsheet-implement-microsoft-excel-format-painter/VB/WindowsFormsApplication1/FormatPainterProvider.vb#L74

vb
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

SelectedComment

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace