Hello all
I am trying to write a specialist outlining tool, using the TreeView
control (in VB5 running on W95).
It has gone quite well so far. I have found some very useful info on
how to read and write tree structures to disk, and I've even figured
out how to cut, copy and paste branches of the tree. So, I'm fairly
pleased with progress.
But, I've got one major problem. The order of the nodes is important,
and I can't find a way to control this. I mean that, for my
application, this:
=Animals
==Cats
==Dogs
==Horses
==Giraffes
Is NOT equivalent to this:
=Animals
==Dogs
==Cats
==Horses
==Giraffes
The functionality I want (using the first example above) is to drag
'Giraffes' over 'Dogs' and release it, such that we now have:
=Animals
==Cats
==Dogs
==Giraffes
==Horses
Sounds simple, but I can't seem to find a way of controlling the order
of the nodes (except that their order seems to be the order in which
they are created. I suppose I could re-create the whole tree by
writing it to disk, deleting it, then re-reading it, every time there
is a drag and drop, but this seems a bit elaborate...).
Any help you can give me would be very much appreciated.
Thanks
Mr Chat