Juce 1.8 and treeview


#1

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:


#2

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


#3

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 ??


#4

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.


#5

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:


#6

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.


#7