Spread 8.0 Documentation
TextTipFetch, ScriptTextTipFetch Events
Support Options
ActiveX Reference > ActiveX Events > TextTipFetch, ScriptTextTipFetch Events

Glossary Item Box

TextTipFetch, ScriptTextTipFetch Events


See Also    Example

Applies To

fpSpread control

Description

Occurs when the TextTip property is set to a value other than 0 (None) and the pointer is over a cell or a header cell for text tips or over a cell note indicator for cell notes.

Syntax

C++

afx_msg void OnTextTipFetchfpSpread(UINT, int, CWnd*, LPVOID);

Visual Basic

TextTipFetch(ByVal Col As Long, ByVal Row As Long, MultiLine As FPSpreadADO.TextTipFetchMultilineConstants, TipWidth As Long, TipText As String, ShowTip As Boolean)

Note: The ScriptTextTipFetch event uses the same syntax except event parameters that are not passed "ByVal" are declared as variants. For more information on Script events, see Scripting Environment Usage.

Parameters

The following parameters are available:

Parameter Description

Col Column number of cell
Row Row number of cell
MultiLine Specify whether to display text on multiple lines in text tip or cell note
Choose one of the following values:
Value Constant Description
0 TextTipFetchMultilineSingle Displays text on one line
1 TextTipFetchMultilineMultiple Wraps text based on setting of the TipWidth parameter
2 TextTipFetchMultilineAuto (Default) Text wrap and tip or note width determined by the control
TipWidth Width of tip or note in pixels for VC++ and twips for VB
(Default is width of text in cell or header under the pointer.)
Note: For text tips, the tip width will never be larger than the width of the text itself. For cell notes, the tip width can be larger than the note width.
TipText Specify text to display in text tip
(Default text is text in cell or header under the pointer.)
Note: Does not apply for cell notes. Use the CellNote property to specify cell note text.
ShowTip Set to False or 0 if you do not want to display a text tip or a cell note.
For text tips, the default is True or 1 when there is more text than can be displayed in the cell. Otherwise, the default is False or 0. For cell notes, the default is always True.

Remarks

Use this event to display text tips or cell notes, to respond to the display of text tips or cell notes, to configure text tips or cell notes, or to not display a text tip or a cell note. Set the ShowTip parameter to True or 1 to display text tips when the text in the cell or header is completely displayed. The number of characters allowed for a text tip is unlimited; however, the work station resources may limit this number.

Use the TextTip property to specify whether and when text tips and cell notes are displayed and how they are positioned. Text tips are displayed for cells or headers in the control when the pointer is over a cell or header. Cell notes are displayed for cells or headers in the control when the pointer is over a cell note indicator, a red square in the upper right corner of the cell.

Whether the TextTipFetch event occurs when the control has the focus depends on the setting of the TextTip property. If the TextTip property is set to 1 (Fixed) or 2 (Floating), the TextTipFetch event occurs whenever the pointer is over a cell or a header cell or a cell note indicator, even if the control does not have the focus. If the TextTip property is set to 3 (Fixed Focus Only) or 4 (Floating Focus Only), the TextTipFetch event occurs whenever the pointer is over a cell or a header or a cell note indicator, but only when the control has the focus.

For text tips, the TextTipFetch event does not occur until after the pointer has been over the cell or header without moving for longer than the time period specified by the TextTipDelay property. For cell notes, the CellNoteIndicator property determines whether the TextTipFetch event occurs when the pointer is over the cell note indicator.

If you choose to display text tips and cell notes in the fpSpread control, you can use the IsFetchCellNote method to determine whether the TextTipFetch event occurs for a cell note and to show and modify the text tips and cell notes accordingly.

If you choose to display text tips in the fpSpread control, be sure not to display a tool tip for the control. That is, do not provide text for the ToolTipText property in Visual Basic. If you display both a tool tip and text tips, you might experience unexpected results.

Specify the appearance of text tips and cell notes using the SetTextTipAppearance method.

Use the SheetSendingEvent property if you want to return the sheet for which this event occured.

Note: This event will occur if you use the fpSpread control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the fpSpread control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and use the ScriptTextTipFetch event. ScriptTextTipFetch event parameters that are not passed "ByVal" are declared as variants.

See Also

Displaying Text Tips
Customizing Text Tips
Providing Cell Notes

CellNote, CellNoteIndicator, ScriptEnhanced, SheetSendingEvent, TextTip, TextTipDelay properties

GetTextTipAppearance, IsFetchCellNote, SetTextTipAppearance methods

Copyright © GrapeCity, inc. All rights reserved.