Frame tree with juce?

How is this possible to make it with Juce please ?

Dont take note of the red arrow, just the ability of expanding frame qith grey arrows.


Should be pretty easy.
First make a container component. That can have “page” components added to it. I suppose you can do this either by making your own list and add methods or by overriding the regular component methods. On second though the latter would probably be messy. Better to make it yourself, something like:

OwnedArray childPageList;

and then

void addPage(PageCompo* p)

The page component in turn sends a changeMessage when it’s been clicked, and the container is responsible for setting the state of the pages and then repainting.

The pageComponent should probably have methods for Folding and Opening when it shows and hides it’s children.

…Something like that.

Thanks ! Ill post back when I test.

Not sure to understand the proposition.

I m just trying to make menu, and to develop them as the picture above…

It means I think, using grey arrows as “visibility” switch,
and being sure to keep vertical order of components as “Div” in html…

i made a component just like this actually, a little while ago. it’s probably hidden on the forum somewhere… i’ll have a look for it later


here’s the thread it came from all that time ago…

Here’s a link to a zip of the code as it was then. I’ve not updated it at all since, so it may be incompatible with the current juce version, but it should at least help.

I don’t have any webspace, so i’m sharing this file via the ‘skydrive’ thing provided with Windows Live… let me know if you can’t access it and i’ll email it to you instead.