TableListBox's LookAndFeel


#1

Where can I set custom color in TableListBox, such as scroll bar, hightlighted item’s background and foreground and so on?


#2

I think that stuff all happens in the TableListBoxModel paint callbacks


#3

In your derived class in the ctor you can set some colours:

getViewport()->setScrollBarsShown (true, false);
getViewport()->setScrollBarThickness (10);

getViewport()->getVerticalScrollBar()->setColour (ScrollBar::ColourIds::thumbColourId, Colours::silver);
getViewport()->getVerticalScrollBar()->setColour (ScrollBar::ColourIds::trackColourId, Colours::grey);

setColour (ListBox::backgroundColourId, Colours::antiquewhite);

The rest, as Jules said are handled in the paint callbacks.

Rail