ViewPort scrollbars not appearing

I am sure I am missing something basic - can someone point out to me how come this is not doing what I expect?

I have created a dialog with a viewport component.
In the viewport - I add a generic Component

Within the Component - I add a number of label elements and resize the Component reflecting the actual layout size of these components at runtime. The resulting component is taller than the viewport.

The flags on the viewport are set to show the vertical scrollbar.

And - no scrollbar.

This is the code:
(mpIndexTerms is the Viewport)

int iY(0);
Component *pCanvas(new Component(“indextermscanvas”));
pCanvas->setSize(mpIndexTerms->getWidth(), mpIndexTerms->getHeight());
for (std::list<std::pair<String, uint32>>::iterator cIter = lTerms.begin(); cIter != lTerms.end(); ++cIter) {
String sTerm((*cIter).first + " (" + String((*cIter).second) + “)”);
Label *pLabel(new Label(“indexlabel”, sTerm));
pLabel->setBounds(Rectangle(4, iY, 200, 18));
pLabel->setColour(Label::ColourIds::textColourId, Colours::white);
iY += pLabel->getHeight();
pCanvas->setBounds(0, 0, mpIndexTerms->getWidth(), iY);

I don’t see a setViewedComponent call on the ViewPort anywhere in your code. You should call that with your “canvas” component.

Thank you for a clear pair of eyes - that was it!

I had missed that as all the labels got drawn where I expected, however that was not within the ViewPort.

Much appreciated!