Spread Windows Forms 9.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
ColumnGets the column index of the cell that is clicked.  
ColumnFooterGets whether the cell is in the column footer.  
ColumnHeaderGets whether the cell is in the column headers.  
FetchCellNoteGets whether to fetch the cell note.  
RowGets the row index of the cell that is clicked.  
RowHeaderGets whether the cell is in the row headers.  
ShowTipGets or sets whether to show the text tip or show the cell note as a tip window.  
TipTextGets or sets the text in the text tip.  
TipWidthGets or sets the width of the text tip or cell note.  
ViewGets the view that contains the cell that is clicked.  
WrapTextGets 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 Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

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

 

 


Copyright © GrapeCity, inc. All rights reserved.