Visual Basic (Declaration) | |
---|---|
Public Event TextTipFetch As TextTipFetchEventHandler |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As FpSpread Dim handler As TextTipFetchEventHandler AddHandler instance.TextTipFetch, handler |
C# | |
---|---|
public event TextTipFetchEventHandler TextTipFetch |
The event handler receives an argument of type TextTipFetchEventArgs containing data related to this event. The following TextTipFetchEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Column | Gets the column index of the cell that is clicked. |
ColumnFooter | Gets whether the cell is in the column footer. |
ColumnHeader | Gets whether the cell is in the column headers. |
FetchCellNote | Gets whether to fetch the cell note. |
Row | Gets the row index of the cell that is clicked. |
RowHeader | Gets whether the cell is in the row headers. |
ShowTip | Gets or sets whether to show the text tip or show the cell note as a tip window. |
TipText | Gets or sets the text in the text tip. |
TipWidth | Gets or sets the width of the text tip or cell note. |
View | Gets the view that contains the cell that is clicked. |
WrapText | Gets or sets whether the text tip or cell note should wrap for multiple lines. |
This event is raised by the OnTextTipFetch method when the cursor is over a cell and the text tip or cell note is to be displayed.
This event works for both text tips and cell notes.
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. Text tips are displayed for cells in the Spread component when the pointer is over that cell. Cell notes are displayed for cells in the Spread component when the pointer is over a cell note indicator, a red square in the upper corner of the cell. Cells can be in the data area or the headers.
Whether the TextTipFetch event occurs when the Spread component has the focus depends on the setting of the TextTipPolicy property using the values in the TextTipPolicy enumeration.
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 CellNoteIndicatorVisible property determines whether the TextTipFetch event occurs when the pointer is over the cell note indicator.
For more details on the individual event arguments, refer to TextTipFetchEventArgs members.
C# | Copy Code |
---|---|
private void fpSpread1_TextTipFetch(object sender, FarPoint.Win.Spread.TextTipFetchEventArgs e) { e.ShowTip = true; e.TipText = "I am over cell " + e.Row + " ," + e.Column; e.View.TextTipAppearance.Font = New Font("Comic Sans MS", 10, FontStyle.Bold); e.View.TextTipAppearance.BackColor = Color.Yellow; e.View.TextTipAppearance.ForeColor = Color.Red; } |
Visual Basic | Copy Code |
---|---|
Private Sub FpSpread1_TextTipFetch(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.TextTipFetchEventArgs) Handles FpSpread1.TextTipFetch e.ShowTip = True e.TipText = "I am over cell " e.Row & " ," & e.Column e.View.TextTipAppearance.Font = New Font("Comic Sans MS", 10, FontStyle.Bold) e.View.TextTipAppearance.BackColor = Color.Yellow e.View.TextTipAppearance.ForeColor = Color.Red End Sub |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2