Juce 1.8 and treeview

Hello

The version 1.8 is good :smiley:

but i have a problem with treeview. My treeview is link with a sorted string list, and when there is change in my list, i must close and open the parent node to see the change.

Is there another method ??

PS : sorry for my english, iā€™m french :wink:

Of course - you just remove all the sub-items and add them again when they change.

OK, itā€™s good

But now, i want to dragā€™nā€™Drop a item from a position to another position (like directory in windows explorer) What is the simplest method ?

i try several method, but i donā€™t succeed :frowning:

Can somenone help me ??

Thatā€™s something that would be best if I built it into the treeview, though Iā€™ve no time right now to do that.

You can use the drag-and-drop stuff to do it (like I do in tracktionā€™s project list). Iā€™m going to post some new demo code soon with an example of drag-and-drop in it, so that might help.

I try the dragā€™nā€™drop functionnality in the 1.9 demo (openGL works fine !!). Itā€™s very simple, but ā€¦ i canā€™t do same things with my treeview :frowning:

I create a class herited from TreeViewItem, but i canā€™t use ā€œmouseDragā€ ā€¦ and when i try the ā€œcreateItemComponentā€ function, i donā€™t suceed.
Is there a solution ??

Thanks for all :wink:

TreeViewItem can create custom components for each item in your tree, so you can use them to handle all the mouse dragging you need. Check out TreeViewItem::createItemComponent() for how to do it.