Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag and drop in Treeview
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01019044
Message ID:
01019491
Views:
27
>Quite nice!
>another question:
>I am moving a node by adjusting the order field in the dbf and reloading the tree.
>works fine but the node does not say selected.
>the follwing code does nothing
>How would I do this

I don't think it's necessary to "reload" the tree after affecting a change to the underlying DBF(s). You can change the x3 Value in the DBF and use the node "Remove" function (to delete it's old position) and the node "add after/before" features to reposition the node.

The tree can be sorted to. If X3 could be part of the nodes text property (like the very left part) you could also reposition a node by simply changing it's text property and then issuing a sort (providing it is not moving to another [different] parent node).

>
>
>
>
>thisform.LoadTree
>thisform.oTree.Nodes("_RT"+tran(x3)).selected=.t.
>
>
>Tanks,
>
>Peter
>
>
>
>>In addition to Boris's tool, this project ( download #16575 )demonstrates a "slide" and drop (click child node, hold down shift and drag to another "parent" node in tree view).
>>
>>I have a demo project that will drag a grand, a parent (when needed) and child node from one tree view to another. Email for the zip if you think it will help.
>>
>>>Has anybody (probably Cetin :-) done drag and drop in a tree view
>>>
>>>I have the treeview
>>>Now I want the user to be able to select a branch or leave and drag it to another location in the same tree
>>>
>>>basically I need to get the parent_id from the selected branch and when it gets dopped get it's key and use it as parent key in the selected branch
>>>
>>>any ideas?
>>>
>>>thank you
>>>
>>>
>>>[peter
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform