Updating TableListBox from underlying asynchronous code

Very sorry for a newbie question…disappointed that I could not figure this out from the existing info…

I have underlying data, which I think is referred to as the “model”, and it can be updated asynchronously from the GUI. I have a TableListBox and associated TableListBoxModel that display the underlying data. The TableListBoxModel::paintCell is the key overload that takes the underlying data and displays it. When an asynchronous event happens (data received from outside of the program) and the underlying data is changed, I believe I should call repaint()…on something. I have tried repaint on the TableListBox, TableListBoxModel, and the MainComponent that contains these elements. None of that works. I’ve setup a timer to repaint TableListBox and TableListBoxModel periodically and still that doesn’t work. It seems like repaint just doesn’t trigger TableListBoxModel::paintCell(). If I click a column header to cause a sort event, then the table updates properly. Any ideas?

Tried void ListBox::updateContent() ? (Note that it must be called from the GUI thread.)

1 Like

Yes, this works. After 24 hours of being stalled, I can get back to making progress. Thanks!