Box layout

Hello I have used the webcontrol component to render my UI and it works nicely, but sometimes it hangs (at random) the application.

So I will try to do a really simple browser functionality with the use of the juce components.

My first need is to render a list (vertical) of components with different heights (think of a list of divs), is there something that I can use for that?

Regards Okku Touronen

TreeView would do the trick. TreeViewItem has virtual int TreeViewItem::getItemHeight() To make it look like a normal list you’d have to set setLinesDrawnForSubItems(false), setRootItemVisible(false), and setIndentSize(0).

Wow. Even a simple browser is quite a task! TBH I’d advise just using a completely custom component - you could waste a lot of time trying to bend a treeview or table or whatever to do what you need when it might have been quicker just to write it all yourself.

Sorry for being a little over dramatic, I am not going to write a browser.

I want to do following:

bl = new BoxLayout(BoxLayout::Vertical);
bl->addChild(new BigChild());
bl->addChild(new SmallChild());
bl->addChild(new SmallChild());
bl->addChild(new SmallChild());


And let the BoxLayout handle the positioning of the child controls (and add scrollbars if needed).
Of course if I add a BoxLayout inside antoher it should work. And if a control inside a BoxLayout grows/shrinks it should also be handled.

I will look into the treeview and see if I can just extract the needed parts to make a BoxLayout component.