# Adding a Note to a Cell

Learn how to add, customize, and display cell notes in Spread.NET with our comprehensive guide.

## Content

You can add a note to a cell or range of cells. The note may contain text such as a comment, a question, or documentation describing the origin of the cell's value. Each cell with a note attached displays a cell note indicator (by default a small red square) in the upper right corner of the cell. When the pointer is over a cell indicator of a cell that has a note, the note text displays in a box next to the cell. Alternatively, you can set the cell notes to always be displayed, not just when the pointer moves over the indicator. For cell notes that are set as popup notes, they are displayed in a similar manner as text tips. When the pointer is over the cell note indicator, the cell note text appears. This is illustrated in the following figure.
![Cell Note](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/cellnote.png)
The red square in the upper right corner of the cell indicates that a note is available for that cell. An example is shown in the following figure. You can use the [CellNoteIndicatorVisible](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.CellNoteIndicatorVisible.html) property to hide the cell note indicator when the pointer is over the cell note indicator. You can use the [NoteIndicatorPosition](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.NoteIndicatorPosition.html) property for the cell to set the location of the note.
![Cell Note Indicator](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/cellnoteindicator.png)

## Customizing the Cell Note Behavior

You can allow notes to remain displayed, as if they were sticky notes. In this case they appear in a rectangle next to the cell with an expandable line that attaches the note to the cell, allowing the note to be moved by the user. An example of a sticky note that has been selected is shown in the following figure. The cell [NoteStyle](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.NoteStyle.html) property must use the [NoteStyle](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.NoteStyle.html) enumeration to allow this. The sticky note in this case is a shape that can be moved.
![Sticky Note Example](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/cellnote-movable.png)
To move the note, press the left mouse button when the pointer is on the note to select it, drag it to the destination, and release the mouse button to place it. The line from the cell note indicator to the sticky note stretches to accommodate any placement of the note.
You can allow the user to edit cell notes if the notes are always shown. To allow the user to edit it, set the [AllowNoteEdit](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.AllowNoteEdit.html) property for the sheet, which sets all sticky notes on that sheet to be editable by the user.
The cell note can contain an extra bit of human readable information for the end user; you can also allow the user to attach their own information in cell notes. The information can be whatever is useful to the end user. For example, the end user might use the cell note to indicate the original source of the cell value (cell note = "Value as obtained from an article in the July issue of our corporate magazine").
You can further customize the use of notes:

* automatically size cell notes based on contents
* customize locations of cell notes
* make sticky notes so they stay where placed
* customize the note indicator (see section below)
* print cell notes

There are additional classes that can be used to customize the appearance of the cell note. Use the [StickyNoteStyleInfo](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo.html) class for notes.

## Understanding Limitations

There are some limitations to the use and display of cell notes:

* The note does not display when the [NoteStyle](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.NoteStyle.html) property of the cell object is set to hidden.
* The note does not display in certain cell types when the **IsReservedLocation** method for that cell type is set to true. This may occur in a check box cell, or in a combo box cell that is not editable, or when a pointer is over a link in a hyperlink cell.
* The cell note indicator does not appear when the cell is in edit mode.
* The cell note of an anchor cell is displayed in a cell span, but the cell notes of any other cell in the span are not displayed.
* Use caution in choosing a red color as the background for a cell that could contain a red cell note. The cell note indicator could be invisible against a red background.

## Customizing the Cell Note Indicator

You can change the size and the color of the cell note indicator. The default size of the cell note indicator is a 3x3 square but you can modify the width or the height of the note indicator to any positive integer value. The default color of the cell note indicator is red but you can assign any color value to it. The following figure shows the indicator using default values and a custom indicator using custom values. The custom values are set using the [NoteIndicatorColor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.NoteIndicatorColor.html) and [NoteIndicatorSize](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.NoteIndicatorSize.html) properties.
![Cell Note Indicator Examples](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/cellnote-custom.png)
For more information on notes, refer to the [Note](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.Note.html) property in the [Cell](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Cell.html) class.
For information about printing cell notes, refer to [Printing a Sheet with Cell Notes](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printnotes).

## Using the Properties Window

1. At design time, in the **Properties** window, select the **Spread** component.
2. Select the **Sheets** property.
3. Click the button to display the **SheetView Collection Editor**.
4. In the **Members** list, select the sheet in which the cells appear.
5. In the properties list, select the **Cells** property and then click the button to display the **Cell, Column, and Row Editor**.
6. Select the cells for which you want to set the note.
7. In the properties list, select the **Note** property and type the note text.
8. Click **OK** to close the **Cell, Column, and Row Editor**.
9. Click **OK** to close the **SheetView Collection Editor**.

## Using a Shortcut

1. Set the **Note** property for the cells or range of cells in the sheet of the Spread component.
2. Set the properties for customizing the note, including the note indicator and note position and display.

**Example**
This example code sets an editable cell note for a range of cells and sets the color of the cell note indicator to green (from the default red).

```csharp
fpSpread1.Sheets[0].AllowNoteEdit = true;
fpSpread1.Sheets[0].Cells[1, 1, 3, 3].Note = "test";
fpSpread1.Sheets[0].Cells[1, 1, 3, 3].NoteIndicatorColor = Color.Green;
fpSpread1.Sheets[0].Cells[1, 1, 3, 3].NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote;
```

```vbnet
fpSpread1.Sheets(0).AllowNoteEdit = True
fpSpread1.Sheets(0).Cells(1, 1, 3, 3).Note = "test"
fpSpread1.Sheets(0).Cells(1, 1, 3, 3).NoteIndicatorColor = Color.Green
fpSpread1.Sheets(0).Cells(1, 1, 3, 3).NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote
```

**Example**
This example code defines a range of cells and then sets the note for that range.

```csharp
FarPoint.Win.Spread.Cell range1;
range1 = fpSpread1.ActiveSheet.Cells[1, 1, 3, 3];
range1.Value = "Value Here";
range1.Note = "This is the note that describes the value.";
```

```vbnet
Dim range1 As FarPoint.Win.Spread.Cell
range1 = fpSpread1.ActiveSheet.Cells(1, 1, 3, 3)
range1.Value = "Value Here"
range1.Note = "This is the note that describes the value."
```

## Using the Spread Designer

1. In the work area, select the cell or cells for which you want to set the notes to display.
2. In the properties list (in the **Misc** group), select the **Note** property and type in the text of the note.
    (Or select the **Cells** property and click on the button to call up the **Cell, Column, and Row** editor and select the cells in that editor.)
3. From the **File** menu choose **Apply and Exit** to apply your changes to the component and exit Spread Designer.

## See Also

[Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell)
[Working with the Active Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-cellactive)
[Creating a Range of Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-cellrange)
[Managing Data on a Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-usedata)
[Displaying Cell Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-celldata)
[Creating a Span of Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-cellspan)
[Allowing Cells to Merge Automatically](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-cellmerge)
[Adding a Tag to a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-tags-cell)
[Displaying Text Tips in a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-cell-texttip)
[Working with Pattern and Gradient Fill Effects](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-cell/spwin-patternandgradientfill)