TableListBox paintRowBackground( ) problem


#1

Hey guys first post so please go easy on me, I'm new!!

So I'm having some issues with custom TableListBox redraws. I'm on MacOS X.

In my case the custom table has four states for each row, each to be displayed with a different border rectangle colour etc.

The paintRowBackground() method is overridden to do this work (it reads the state in from the session model and draws accordingly).

Most of the time (but not all!) paintRowBackground() gets called and performs the redraw code and exits, BUT, this redraw isn't visible onscreen until I either flip views, resize the existing table container view, or drag the entire window to a second monitor (which seems to trigger a complete redraw).

If I resize the container view slightly the changes previously made in paintRowBackground() take immediate effect without the function being recalled (unlike dragging between screens or flipping views).

My colleague is having a similar problem so I'm not entirely alone in this.

Stepped debugging is proving tricky as the app is gaining and losing focus between breakpoints causing endlessly looping redraws...

Any ideas very welcome! :)

 

 

 

 

 

 

 


#2

TableListBox::updateContent() and/or repaint() any help?


#3

Sadly not - updateContent() is already being called for every table model state change. Also tried repaint() and other more granular redraw methods.

The tables work fine for state changes initiated by a mouse click, but they fail for state changes made programatically (e.g. an off-table button press that should change the state of multiple rows of the table).

So it would appear I have may two discrete problems:

 

1) paintRowBackground() is not always called by the framework when updateContent() is called after a state change.

 

2) paintRowBackground() is called and redraws the row but nothing changes onscreen until a more drastic redraw happens (resize, screen swap etc).

 

Juce 3.2 by the way.