Page 1 of 1

Tree and drag & drop

Posted: Tue Sep 06, 2011 5:28 am
by c-tec
Hello,
I have a document managment system that I display in a tree. Now I would like to add a document to a item with drag and drop. Is this possible ?
regards
Rudolf

Re: Tree and drag & drop

Posted: Tue Sep 06, 2011 12:57 pm
by Auge_Ohr
hi,

XbpTreeView() have XbpWindow() as SuperClass so it must have o:dropZone.

to "add" a Item you must spezify at with Node / Subnode your Item was "drop" when o:LbUp
at that Position you can use o:itemFromPos(aPos) to find it out with Item is Target.

Design :

if you want to "drop" something into a Subnode it must be "visible"
so you need a TreeView which react on "hover" on a Node and send xbeTV_ItemExpanded
to automatic "open" Subnode.

if your combine TreeView with a Browse or ListView you should be able to "drop" it.
here a Picture what i meenImage

Re: Tree and drag & drop

Posted: Wed Sep 07, 2011 1:15 pm
by rdonnay
Rudolf -

I am on vacation, but if you will write me a test program with the treeview, I will modify the code to show you how to drop an item onto a tree branch.

Roger

Re: Tree and drag & drop

Posted: Wed Sep 07, 2011 11:36 pm
by c-tec
Hello Roger,
thank you, great !
Jimmys solution looks very good, thank you Jimmy, but I prefer a solution direct in eXPress++, it's easier for me.
regards
Rudolf