tooltip for a grid cell

Here’s a C++ sample which shows the row and column numbers
as a tooltip:

BEGIN_EVENT_TABLE(DbvalGrid, wxGrid)

EVT_MOTION(DbvalGrid::updateToolTips)

END_EVENT_TABLE()

void
DbvalGrid::updateToolTips(wxMouseEvent& event)

{

int row =
YToRow(event.GetPosition().y);

int col =
XToCol(event.GetPosition().x);

    wxString

tip;

if (col >=
0)

    {
   tip << row

<< ", " << col;

    }

GetGridWindow()->SetToolTip(tip);

}

HTH,

Cristina.