When the header of a table is setStretchToFitActive (true), we expect the horizontalScrollBar to never show up.
but it may appears when resizing the columns. This can be easily reproduce in the WidgetsDemo if you add table.getHeader().setStretchToFitActive (true);
This is because when limiting the width, the vertical scrollbar width is not taken into acount.
adding the following in void TableHeaderComponent::mouseDrag (const MouseEvent& e) fixes it and makes it much nicer :
if (stretchToFit) { [...] if (ListBox* listBox = findParentComponentOfClass<ListBox>()) minWidthOnRight += listBox->getViewport()->getVerticalScrollBar()->getWidth(); [...] }
What do you think of it, is that too dirty or would you be ok to add something like that?