Hi there,
I have a problem with tooltips in tablemodel that are driving me ‘loca’
I have a table model that is working fine. Each row/column has a diferent label with diferent tooltips.
The problem is that if for example I’m in cell 1-4 and go to the one below (1-5), the tooltip doesn’t change (it shows me the 1-4 one), if i carry on going down it doesn’t update neither, allways shows the 1-4 tooltip… unless I take the mouse out of the datatable and put it back again. In that case if I go directly to the 1-5, it shows the proper tooltip.
That’s a little bit annoying because if i want to see the tooltips of a complete column i have to make jumps in&out my table.
The weird thing is that that behavior is only when i go through a column. If I move the mouse through the cells of a row, it works fine!!!
That’s how i set the tooltip…
Component* ProductStatusTableModel::refreshComponentForCell(int rowNumber, int columnId, bool isRowSelected, Component* existingComponentToUpdate)
{
if(ProductDatabase::Self()->GetDisplayItemCount() > 0)
{
/* other columns …*/
if(columnId==3)
{
if(existingComponentToUpdate)
deleteAndZero(existingComponentToUpdate);
Label *pLabel;
String latestLocalVersion;
ProductData* pData = ProductDatabase::Self()->GetDisplayItemAtRow(rowNumber);
pData->GetLocalVersionNumberAndStringLatest(latestLocalVersion);
pLabel = new Label(T("local"), latestLocalVersion);
pLabel->setTooltip(pData->GetProductVersionInformationString());
pLabel->setColour(Label::backgroundColourId, Colours::black);
return pLabel;
}
/* other columns …*/
}
Help please!!
A