Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example uses a cell tag to supply information that is displayed in a text tip for a cell, as shown in the following figure.

C++

void CmyWnd::MyFunc()
{
    m_Spread1.SetCol(2);
    m_Spread1.SetRow(2);
    m_Spread1.SetCellTag("Add information here.");
    m_Spread1.SetTextTip(1);
}

void CmyWnd::OnTextTipFetchSpread1(long Col, long Row, short FAR* MultiLine, long FAR* TipWidth, BSTR FAR* TipText, BOOL FAR* ShowTip)
{
    *TipText = m_Spread1.GetCellTag().AllocSysString();
    *ShowTip = TRUE;
}

Visual Basic

Private Sub Form_Load()
fpSpread1.Col = 2
fpSpread1.Row = 2
fpSpread1.CellTag = "Add information here."
fpSpread1.TextTip = TextTipFixed
End Sub

Private Sub fpSpread1_TextTipFetch(ByVal Col As Long, ByVal Row As Long, MultiLine As Integer, TipWidth As Long, TipText As String, ShowTip As Boolean)
TipText = fpSpread1.CellTag
ShowTip = True
End Sub

Copyright © GrapeCity, inc. All rights reserved.