I have a tree control and a header control. I want the header to repaint everytime the tree scrolls. I couldn’t figure out a good way to do this, so I just put a call to repaint() inside the call to paint(). This works on the pc, not the mac.
void Tree::paint(Graphics& g)
{
header->repaint();
// drawing code
}
On the mac, this will cause the header control to be a black rectangle.
It would be nice if listeners could be added to a Viewport, I know you can subclass it, but this isn’t always possible, like in the case where the TreeView creates the viewport.