Painting a cell that is created using refreshComponentForCell


Sorry if this question is easy but I think I am missing something!

I have a TableListBox that has a number of cells that contain just text, they are drawn happily by the paintCell function and this works just fine.

I then have a number of other cells that respond to refreshComponentForCell and return a component (in this case an ImageButton), which are also drawn correct and work as expected.

But… As far as I can see the paintCell function is not called when refreshComponentForCell returns a Component and therefore any paintCell values are not executed for the cell concerned.

How do I modify the cell border / colour etc. for a cell where I am returning a component.

Thank you for pointing a noob in the right direction.