Tablelistbox refresh after tooltip display


#1

Hi,

I’m using a tableListBox component, and have coded a getCellTooltip function in the associated TableListBoxModel class (I mean, in the class that inherits TableListBoxModel). The tooltips show as expected when I hover the mouse over the table cells, but when the tooltip window goes away, the part of the table behind it doesn’t refresh properly (it looks kind of like pieces of the table -same kind of color, shape…-, but in the wrong place).

Any idea anyone? Am I supposed to do more than getting getCellTooltip to return the desired tooltip string, like calling a repaint() somewhere, in order to get the tooltip feature to work fully?

Thanks in advance.

PS: for the sake of not having too many classes, the class I made inherit TableListBoxModel to manage the TableListBox content is actually the TableListBox object’s parent component (i.e. the Jucer-generated GUI component inside which the table is displayed among other items). I don’t think this can be the source of the problem, but just in case I thought I could mention it…


#2

The only time you’ll ever see graphics corruption like that would be if you call setOpaque (true) on a component which doesn’t paint its entire background.