SSGetCellNote, SSSetCellNote, SSSetCellNoteRange Functions
Applies To
fpSpread DLL control
Description
Set or return a comment for the cell or for a block of cells.
Syntax
short SSGetCellNote(HWND hWnd, SS_COORD Col, SS_COORD Row, LPTSTR Note);
BOOL SSSetCellNote(HWND hWnd, SS_COORD Col, SS_COORD Row, LPTSTR Note);
BOOL SSSetCellNoteRange(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPTSTR Note)
short TSpread::GetCellNote(SS_COORD Col, SS_COORD Row, LPTSTR Note);
BOOL TSpread::SetCellNote(SS_COORD Col, SS_COORD Row, LPTSTR Note);
BOOL TSpread::SetCellNoteRange(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPTSTR Note)
Parameters
The SSGetCellNote function has the following parameters:
Parameter | Description |
---|---|
hWnd | Window handle of the fpSpread control |
Col | Column number of cell |
Row | Row number of cell |
Note | Cell note text |
The SSSetCellNote and SSSetCellNoteRange functions have the following parameters:
Parameter | Description |
---|---|
hWnd | Window handle of the fpSpread control |
Col | Column number of cell |
Col2 | Column number of lower-right cell of the block when defining a block for the SSSetCellNoteRange function |
Row | Row number of cell |
Row2 | Row number of lower-right cell of the block when defining a block for the SSSetCellNoteRange function |
Note | Cell note text |
This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.
Remarks
Cells with notes display a cell note indicator, a red square in the upper right corner of the cell, as shown in the following figure.
Notes:
|
Cell notes are displayed in a similar manner as text tips. When the pointer is over the cell note indicator, the cell note text appears.
When the control displays the cell note, the SSM_TEXTTIPFETCH message is sent. To display the cell note, set the SSSetTextTip function's Status parameter to a value other than 0 (SS_TT_STATUS_OFF) and set the Show field in the SS_TEXTTIPFETCH structure to TRUE. You can display both text tips and cell notes for a cell. You can call the SSIsFetchCellNote function to determine if the message was sent for a cell note or a text tip and to show and modify the cell notes or text tips accordingly. You can also use the SSSetTextTip function to further customize the cell notes.
The cell note indicator does not appear when the cell is in edit mode. You can also call the SSSetCellNoteIndicator function to hide the cell note indicator and to control whether the SSM_TEXTTIPFETCH message is sent when the pointer is over the cell note indicator.
Return Value
SSGetCellNote: Returns the length of the cell note. The cell note string is returned by the Note parameter. Pass in a NULL value for the Note parameter to just return the length of the cell note.
SSSetCellNote: Nonzero if successful.
See Also
SSGetCellNoteIndicator, SSIsFetchCellNote, SSSetBool (SS_ALLOWCELLOVERFLOW), SSSetCellNoteIndicator, SSSetSheet, SSSetTextTip functions
SSM_TEXTTIPFETCH message
ActiveX Correspondence
CellNote property