Spread Windows Forms 8.0 Product Documentation
TextTipFetch Event
Example 


Occurs when the pointer (cursor) is over a cell and the text tip or cell note should be displayed (the TextTip property is set to a value other than Off).
Syntax
'Declaration
 
Public Event TextTipFetch As TextTipFetchEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As TextTipFetchEventHandler
 
AddHandler instance.TextTipFetch, handler
public event TextTipFetchEventHandler TextTipFetch
Event Data

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.

PropertyDescription
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.
Remarks

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.

Example
This example raises the TextTipFetch event.
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;
}
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
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

FpSpread Class
FpSpread Members
TextTipPolicy Property
CellNoteIndicatorVisible Property
TextTipFetchEventArgs Class
TextTipPolicy Enumeration

 

 


Copyright © GrapeCity, inc. All rights reserved.