Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Drag Multiple Items From Listview To Treeview


Does anyone have some good sample code for how to
drag multiple listviewitems to an treeview?!

I cant figure it out...

Regards

Peter




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Please Help Me With Drag-n-Drop Of Multiple Items From One Listview To Another.
Hello!

I'm facing a problem with Listview Drog and Drop of multiple items from one listview to another listview. When I try to Drag only one single item, the item is dragged without any problem. However, when the multiple selected items are dragged, the Listview on which the items are dropped, receives information about only one item and not all selected items. The item, about which the information is received, is the same on which I click and hold mouse to start drag action. So, it looks like even though multiple items are selected in a listview, while executing the Drag-Drop action, listview treats it as single item selected!

Is this a default behavior of Listview or am I missing/doing anything wrong? Any work-around for this (seems like default) behavior of Listview? I searched for it and got a code example at http://btmtz.mvps.org/listview/ where the author has demonstrated Drag-Drop of multiple items. However, the code is specifically restricted to re-arranging items within same Listview and the information is transported via Drag-Drop to another Listview, upon which the items are dropped.

To help you all to get a better insight of my problem, I have attached a Demo of Listview Drag-n-Drop. Please see the project and you will see that when one item is dragged from left side Listview to right side Listview, no problem for VB to allow me to do it! However, when you select multiple items in left side Listview and try dragging those to right side Listview, only one item is dragged. Please let me know if I'm doing anything wrong here and please help me to get this stuff to work!

Waiting for your valuable reply ...

Regards,

Ruturaj.

Please Help Me With Drag-n-Drop Of Multiple Items From One Listview To Another.
Hello!

I'm facing a problem with Listview Drog and Drop of multiple items from one listview to another listview. When I try to Drag only one single item, the item is dragged without any problem. However, when the multiple selected items are dragged, the Listview on which the items are dropped, receives information about only one item and not all selected items. The item, about which the information is received, is the same on which I click and hold mouse to start drag action. So, it looks like even though multiple items are selected in a listview, while executing the Drag-Drop action, listview treats it as single item selected!

Is this a default behavior of Listview or am I missing/doing anything wrong? Any work-around for this (seems like default) behavior of Listview? I searched for it and got a code example at http://btmtz.mvps.org/listview/ where the author has demonstrated Drag-Drop of multiple items. However, the code is specifically restricted to re-arranging items within same Listview and the information is transported via Drag-Drop to another Listview, upon which the items are dropped.

To help you all to get a better insight of my problem, I have attached a Demo of Listview Drag-n-Drop. Please see the project and you will see that when one item is dragged from left side Listview to right side Listview, no problem for VB to allow me to do it! However, when you select multiple items in left side Listview and try dragging those to right side Listview, only one item is dragged. Please let me know if I'm doing anything wrong here and please help me to get this stuff to work!

Waiting for your valuable reply ...

Regards,

Ruturaj.

Please Help Me With Drag-n-Drop Of Multiple Items From One Listview To Another.
Hello!

I'm facing a problem with Listview Drog and Drop of multiple items from one listview to another listview. When I try to Drag only one single item, the item is dragged without any problem. However, when the multiple selected items are dragged, the Listview on which the items are dropped, receives information about only one item and not all selected items. The item, about which the information is received, is the same on which I click and hold mouse to start drag action. So, it looks like even though multiple items are selected in a listview, while executing the Drag-Drop action, listview treats it as single item selected!

Is this a default behavior of Listview or am I missing/doing anything wrong? Any work-around for this (seems like default) behavior of Listview? I searched for it and got a code example at http://btmtz.mvps.org/listview/ where the author has demonstrated Drag-Drop of multiple items. However, the code is specifically restricted to re-arranging items within same Listview and the information is transported via Drag-Drop to another Listview, upon which the items are dropped.

To help you all to get a better insight of my problem, I have attached a Demo of Listview Drag-n-Drop. Please see the project and you will see that when one item is dragged from left side Listview to right side Listview, no problem for VB to allow me to do it! However, when you select multiple items in left side Listview and try dragging those to right side Listview, only one item is dragged. Please let me know if I'm doing anything wrong here and please help me to get this stuff to work!

Waiting for your valuable reply ...

Regards,

Ruturaj.

Please Help Me With Drag-n-Drop Of Multiple Items From One Listview To Another.
Hello!

I'm facing a problem with Listview Drog and Drop of multiple items from one listview to another listview. When I try to Drag only one single item, the item is dragged without any problem. However, when the multiple selected items are dragged, the Listview on which the items are dropped, receives information about only one item and not all selected items. The item, about which the information is received, is the same on which I click and hold mouse to start drag action. So, it looks like even though multiple items are selected in a listview, while executing the Drag-Drop action, listview treats it as single item selected!

Is this a default behavior of Listview or am I missing/doing anything wrong? Any work-around for this (seems like default) behavior of Listview? I searched for it and got a code example at http://btmtz.mvps.org/listview/ where the author has demonstrated Drag-Drop of multiple items. However, the code is specifically restricted to re-arranging items within same Listview and the information is transported via Drag-Drop to another Listview, upon which the items are dropped.

To help you all to get a better insight of my problem, I have attached a Demo of Listview Drag-n-Drop. Please see the project and you will see that when one item is dragged from left side Listview to right side Listview, no problem for VB to allow me to do it! However, when you select multiple items in left side Listview and try dragging those to right side Listview, only one item is dragged. Please let me know if I'm doing anything wrong here and please help me to get this stuff to work!

Waiting for your valuable reply ...

Regards,

Ruturaj.

Please Help Me With Drag-n-Drop Of Multiple Items
Hello!

I'm facing a problem with Listview Drog and Drop of multiple items from one listview to another listview. When I try to Drag only one single item, the item is dragged without any problem. However, when the multiple selected items are dragged, the Listview on which the items are dropped, receives information about only one item and not all selected items. The item, about which the information is received, is the same on which I click and hold mouse to start drag action. So, it looks like even though multiple items are selected in a listview, while executing the Drag-Drop action, listview treats it as single item selected!

Is this a default behavior of Listview or am I missing/doing anything wrong? Any work-around for this (seems like default) behavior of Listview? I searched for it and got a code example at http://btmtz.mvps.org/listview/ where the author has demonstrated Drag-Drop of multiple items. However, the code is specifically restricted to re-arranging items within same Listview and the information is transported via Drag-Drop to another Listview, upon which the items are dropped.

Waiting for your valuable reply ...

Regards,

Ruturaj.

Drag-drop Listview Items?
How can i ...(The Title)

Drag And Drop Items In A Listview
Is there an easy way to rearrange the order of the items in a listview with a drag-drop operation? I tried using the HitTest method and some drag/drop events but it is kinda clunky.

Drag/Move Items In Listview Like In WinAmp
Hi,

How to make dragable/moveable items in Listview like in WinAmp?
I use viev mode: report (3)
My list have 10 collumns.

The example how to do it would be great ;]

Thanks

Drag&&Drop Between TreeView And ListView
Hi,

How can i drag&drop items between a TreeView and a ListView?

best regards,
z3r0x

Treeview/Listview Drag And Drop
Hello.

I have 2 questions about dragging into a listview:

1)
Where can I get the code for dragging a specific node from a treeview, into a listview (I just need to add the value of the dragged node as a new record in the listview).

2)
I also look for the code for dragging a file from the desktop into a listview. There are lots of exmaples on the internet for doing this, but I need to drag a file into a listview control (and not any other control).

Thanks,
Edi.

P.S.
I use VB6 and not .NET

Treeview/Listview Drag And Drop
Hello.

I have 2 questions about dragging into a listview:

1)
Where can I get the code for dragging a specific node from a treeview, into a listview (I just need to add the value of the dragged node as a new record in the listview).

2)
I also look for the code for dragging a file from the desktop into a listview. There are lots of exmaples on the internet for doing this, but I need to drag a file into a listview control (and not any other control).

Thanks,
Edi.

P.S.
I use VB6 and not .NET

Drag And Drop Between ListView AND Treeview...OLE Or Otherwise, Anyone?
I have searched and search, and only found 1/2 arsed methods to deal with drag and drop correctly.
Does anyone know the correct way to use OLE drag to drag a listitem and add it to a treeview node.

The exmaples on VBF are not what i am looking for, neither are the ones on FreeVBCode.com

Help.

Woka

TreeView Multiple Nodes Selection For Drag And Drop
Hi,
I am working Treeview Control of Visual Basic Windows Comm Controls, I am loading data from a database on to the Treeview
and drag and drop into the listbox.
My question is, Is it possible to make multiple node selections and do drag and drop at a time with the control that comes along with VB 6.0.

Thank you,
Mike

LIstview && Treeview Drag And Drop Problems
Ok, I have two problems that I would really appreciate some help with. In my program I have a treeview, a listview and a webbrowser. When you expand a treeview node the Listview is populated with file paths like 'C:WindowsDesktopTest1.txt' etc. Now when I click those the webbrowser opens the file (using webbrowser1.navigate (the path)) and displays the text. Here's where I hit my problem.

I'm trying to drag the file path from the listview to a different node in the treeview, but whenever I put in listview1.drag vbbegindrag and set the listview's dragmode to be vbAutomatic I can't select a specific item. When I click anywhere in the listview it gives me the drag icon, but without selecting a filepath first i'm not dragging anything. Has anyone run into this problem before? I need to be able to click it and have it display the file and also be able to drag it to a new treeview node. Thanks in advance for any help.

Items In Listview And Treeview
HI

is there a way to add an item to listview and treeview without
first dimming an object of that type's item ?

when i add an item, one of the parameters is a "key" which is unique and help me to identify that item later on
but it doesnt work, i have to dim an item type
then add the item to the list/tree view and on that item add the subitems, or child items...

isnt there a way to add an item with a unique key so later on i can do whatever i want with it just by using that key?

Unselecting All Items In A Treeview Or Listview *solved*
I now know how to select specific items in a listview/treeview.

This is the thread form anyone who is interested.
http://www.vbforums.com/showthread.p...20#post1397720
What I want to do now is to unselect all items. I thought hiding the selection is an alternative option but I would like to totally unselect all the items.

I know this doesn't work

Code:
lvwMenu.SelectedItem = -1
tvwMenu.SelectedItem = -1

Add Items To A Listview Multiple Columns
Hi... I have a listview with 3 columns... how can i add items to the second and the third column? i know it's a stupid question but i can't solve it


Thanks in advance

simons

Moving Multiple Listview Items Up Or Down At Once
Hi, does anybody know how to move multiple selected listview items up or down at once?

I found the subs below, but they only move one item up or down, even if I have selected multiple items.

Thanks.


vb Code:
Private Enum menmDirections    MoveUp = 1    MoveDown = 2End Enum Private Sub MoveItem(ByVal penmDirection As menmDirections)Dim lvwItem     As ListItemDim lvwNew      As ListItemDim lvwSubItem  As ListSubItemDim lngIndex    As Long    Set lvwItem = lstView.SelectedItem    If Not (lvwItem Is Nothing) Then        If penmDirection = MoveUp Then            lngIndex = lvwItem.Index + 2        ElseIf penmDirection = MoveDown Then            lngIndex = lvwItem.Index - 1        End If        If lngIndex > 0 And lngIndex <= lstView.ListItems.Count + 1 Then            Set lvwNew = lstView.ListItems.Add(lngIndex, , lvwItem.Text)            For Each lvwSubItem In lvwItem.ListSubItems                lvwNew.ListSubItems.Add , lvwSubItem.Key, lvwSubItem.Text, lvwSubItem.ReportIcon, lvwSubItem.ToolTipText            Next lvwSubItem            lvwNew.Selected = True            Set lvwNew = Nothing            lstView.ListItems.Remove lvwItem.Index        End If        Set lvwItem = Nothing    End IfEnd Sub



vb Code:
Private Sub MoveUp(lv As ListView)    Dim itm As ListItem, itmNew As ListItem, i As Long    If lv.SelectedItem.Index > 1 Then        Set itm = lv.SelectedItem        Set itmNew = lv.ListItems.Add(itm.Index - 1, , itm.Text, itm.Icon, itm.SmallIcon)        For i = 1 To itm.ListSubItems.Count            With itm.ListSubItems(i)                Call itmNew.ListSubItems.Add(, .Key, .Text, .ReportIcon, .ToolTipText)            End With        Next        lv.ListItems.Remove itm.Index        itmNew.Selected = True        lv.SetFocus    End IfEnd Sub Private Sub MoveDown(lv As ListView)    Dim itm As ListItem, itmNew As ListItem, i As Long    If lv.SelectedItem.Index < lv.ListItems.Count Then        Set itm = lv.SelectedItem        Set itmNew = lv.ListItems.Add(itm.Index + 2, , itm.Text, itm.Icon, itm.SmallIcon)        For i = 1 To itm.ListSubItems.Count            With itm.ListSubItems(i)                Call itmNew.ListSubItems.Add(, .Key, .Text, .ReportIcon, .ToolTipText)            End With        Next        lv.ListItems.Remove itm.Index        itmNew.Selected = True        lv.SetFocus    End IfEnd Sub

Listview - DragDrop Multiple Items
I have the following code that successfully will drag & drop one item at a time, but doesn't work all the time if multiple rows are selected?
When I start to drag, sometimes nothing happens.

Anybody point me in the right direction please?


Code:
Private Sub lvwSelected_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
On Error GoTo ErrTrap

Dim i As Long
Dim lvwItem As ListItem

For i = 1 To lvwSource.ListItems.Count
If lvwSource.ListItems(i).Selected = True Then
Set lvwItem = lvwSelected.ListItems.Add(, , lvwSource.ListItems(i).Text)
lvwItem.SubItems(1) = lvwSource.ListItems(i).SubItems(1)
lvwItem.SubItems(2) = lvwSource.ListItems(i).SubItems(2)
'remove original item
lvwSource.ListItems.Remove i
End If
Next

Also, when dragging multiple items across, and removing the original item, I now get an error because the ListItem.Count is now out of bounds.
How would I handle this?
Would I add 1 to the value of 'i' before the next loop?

Multiple Selected Items In A Listview
Hello, how can I find out how many selected items there are in a listview?

I'm showing a popup menu when the user right-clicks on an item, but I need to know if only 1 item is selected, so I can disable a menu option.

I've tried this, but it doesn't work.


VB Code:
If ListView.SelectedItem < 2 Then mnuCopyMultiple.Enabled = False

Dragging Multiple Items From A Listview
i have some code to let users drag an item from a listview onto a treeview node, which works fine, but now i want to let them drag multiple items.

the problem is that when then select a bunch of items, then drag them to the treeview, it leaves only the last item they clicked on selected (as if they selected them, then just left-clicked one of them). is there a way to keep them all selected?

also, just out of interest, is there a way to make the drag icon include some text from each selected listview item along with an icon (like when you drag multiple files in windows explorer)?

thanks for any help

Remove Multiple Items From ListView
I've got a ListView control with the MultiSelect property set to True and would like to remove all of the selected items only. I've looked at some of the threads concerning this issue but am still having trouble. I can remove a single selected item but not all of the selected items. My code is as follows:


Code:
Private Sub cmdRemove_Click()

Dim I As Integer

For I = 1 To lstPlot.ListItems.Count
If lstPlot.ListItems(I).Selected = True Then
lstPlot.ListItems.Remove (I)
End If
Next I

End Sub


What am I missing?

Thanks for your help!

Multiple Select Items In Listview
im having a problem in listview. ther ar 2 listviews for Excel and server. the user will select fields in th excel lisview he want to upload in server lisview. it upload a field if the user only select 1 field. but if it highlights many fields it only copy the lastselected fields the other fields highlighted dont work. heres my code:

j = LVExcel.ListItems.Count
 For i = j To 1 Step -1
  If LVExcel.ListItems(i).Selected = True And LVDatabase.ListItems(i).Selected = True Then
        Set rs1 = New ADODB.Recordset
        destinationtble = "select * from [user]"
        rs1.Open destinationtble, gcn, adOpenKeyset, adLockOptimistic
           Do While Not RS.EOF
              rs1.AddNew
              rs1.Fields(LVDatabase.SelectedItem.Text) = RS.Fields(LVExcel.SelectedItem.Text)
              rs1.Update
              RS.MoveNext
           Loop
          Set RS = Nothing
  End If
next i

Show Multiple Items In Listview Taken From Database
How would I show multiple items from an Access database in a listview?

Example: Let's say my database looks like this:

Sender Subject Date
me@isp.com Some Subject 1-13-00 7:59AM
you@otherisp.com Some other subject 7-30-01 8:00AM

I want to load both items into a listview. My current procedure only loads one item at a time. Here is the procedure:


Code:
Dim Recordset As ADODB.Recordset
Select Case Node.Text
Case "Trash"
If Recordset.EOF = True Then Exit Sub
lvwMail.ListItems.Clear
With lvwMail.ListItems.Add(, , Recordset!Sender)
.SubItems(1) = Recordset!Subject
.SubItems(2) = Recordset!Date
End With
End Select

How To Move Multiple Selected Items To New ListView
I have 2 ListView Controls. I need to move multiple selected items from ListView1 to ListView2.

How would I go about doing this?

Drag Items Problem
HI
I've 2 listbox objects.
How can I cut and paste item from one list to other list by dragging the mouse(left button pressed)?
Thank you

ListBox Drag Items
Hi All,
I need some code to drag items in a list box either up or down along with
not just the text but with the itemdata too.
Can anyone hook me up?

TIA John

Drag-n-Drop List Box Items
Is this possible? I have a list box that contains 'items' that involve 4 pieces of data and I want to drag them from one list box to another. Is this possible? What settings do I have to use and how? Thanks!!!

Drag-drop Playlist Items
Short question: How can i drag an item from one playlist (listview, listbox eg.) to the other?

How Can I Drag And Drop Items In Listboxes
ive got these two listboxes, and i want to be able to alter the position of items within one box by drag and drop, while the second listbox repositions its items simultaneously. how can i go about it?

Drag/drop Items In A List Box
I have a listbox with a list of names (order matters, but not sorted by alpha). How can I allow the user to drop/drag one name from its current location to another?
It would be nice to allow several names (must be adjacent in the list) to be moved.

Any thoughts?

Drag && Drop - Items Order
I have to make a form (into a whole app) that allow me to set the order of some records. For example, in a table I have a field that represents the order in which they should be shown. The form I'm being asked to do is one which allow me to set/modify this but with Drag&Drop. Which is the best control you think I should use?

Drag And Drop List Items
How do I drag and drop items from one listbox to another? I know that this should be obvious and automatic but resetting drag proprties doesnt seem to work-I can drag but not drop. Recent threads on this topic deal with more complex issues occurring after the event. I need to get started.
Thanks

Treeview Drag
Sorry, I know that it has been asked many times, but
the search function of VB Forum seems down for a while
and I cannot search anymore.

I am totally ignorance in treeview processing.
What I want to do is insert a node, delete a particular node,
drag and drop a node to another node as a parent,
save the linking information when user press the OK
button.

Does anybody has kind of sample code?

Thanks

Drag And Drop To Reorder Listbox Items??
All,

I am using VB6 with a standard listbox control. What I am trying to do is get drag and drop capability on the items within the list box so that users can re-order the items by dragging and dropping them to the new position.

I have found code on MSDN that works...sort of. It uses the DragDrop event that seems to set the DragMode to automatic in code. The drag and drop does work but it seems as an artifact of that, when I click and drag the item, rather than isolating to the selected item, the entire frame of the listbox becomes attached to the mouse cursor and is dragged as the mouse cursor is moved.

Additionally, it doesn't actually move the control, it just drags the frame with the mouse cursor, when the mouse button is released, the frame disappears and the item is rearranged in the list. I want to just have my defined cursor display, not the list box frame.

Anyone have any code or know how to easily rearrange list box items?

Thanks in advance,

-John

TreeView Drag Image
I have a project that uses a hierarchical TreeView to permit the user to navigate a file structure some three levels deep.

I used an ImageList to assign distinct icons for several file types.

Everything looks good, but when the user drags a file from the TreeView to the designated place, the system blows up the icon to large size as the drag image, and it looks blocky and messy.

I carefully designed the icons to have a 16x16, a 32x32 and a 44x44 representation within the .ico file, but it appears as if the system only uses the smaller image and expands it in crude fashion. It seems to handle stock icons from Windows nicely, but messes up the ones that I created.

Am I missing some trick?


[Edit: I just found this article. Maybe it's not my fault at all!]

http://btmtz.mvps.org/treeview/

Drag Drop From One Treeview To Another
I have another question about Treeviews...

I want to have 2 tvw´s in a form, one of them has a pool of data that I´d like to drag and drop (copy it) into the other treeview...

Can anyone give me some light on this issue?

Treeview And Drag&&Drop
Hi,

I have a treeview with an drag&drop function.
this treeview has 3 layers.


Code:
layer 1
+--layer 2
|--layer3
|--layer3
|--layer3
question:
how can the drag&drop functionality be restricted to the only case that the user is able to move an item from layer 3 into the layer 2 only without creating a new node?
All other layer combinations should be blocked!

Here is my code:

http://chrigi.han-solo.net/treeview.html

best regards,
z3r0x

Drag And Drop With Treeview
Does anyone have any example code of drag and drop from a treeview to a list box. I've tried it myself but I obviously do not quite understand what I am supposed to do so any example code or help would be appreciated

Thanks

TreeView Drag Dropping
Excuse the crude looking code.

I am having trouble with a simplistic drag and drop within the treeview.

I have managed to implement the following code which works fine when selecting a node and highlighting a node to drop onto.

2 problems I am having is

i)The node used for dragging is always the root node.
ii)It seems to drag the whole treeview control not the node I select.

Any help would be appreciated.
Thanx in Advance.


Private Sub tvwDatabase_DragDrop(Source As Control, x As Single, y As Single)

If tvwDatabase.DropHighlight Is Nothing Then
dragging = False
Else
Debug.Print "Dropped onto " &amp; tvwDatabase.DropHighlight
Set tvwDatabase.DropHighlight = Nothing
dragging = False
End If

End Sub


Private Sub tvwDatabase_DragOver(Source As Control, x As Single, y As Single, State As Integer)
Dim nod As Node

Set nod = tvwDatabase.HitTest(x, y)
If Not nod Is Nothing Then
Set tvwDatabase.DropHighlight = nod
Debug.Print ("Dragging over " &amp; nod)
End If

End Sub


Private Sub tvwDatabase_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim nod As Node

Set nodx = tvwDatabase.SelectedItem

Debug.Print "Drag Node = " &amp; nodx

End Sub


Private Sub tvwDatabase_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

Dim nod As Node

If Button = vbLeftButton Then
Set nod = tvwDatabase.HitTest(x, y)
If Not nod Is Nothing Then
tvwDatabase.Drag vbBeginDrag
dragging = True
Debug.Print "Dragging"
End If
End If

TreeView Drag N Drop
I am relatively new to VB and the TreeView control in particular. Can anyone recommend a good tutorial on implementing Drag N Drop functionality? I been through the sample that comes with my version, but it doesn't cover Drag N Drop. Any tutorial that covers the finer points of using the TreeView control would be greatly appreciated. Thanks in advance.

Drag Icon In Treeview???
'ello all,
i'm trying to get the dragicon property to work in a treeview control, where i have an imagelist containing a variety of images used to populate the treeview.

i want the icon of the selected node in the treeview control to appear as a ghost image during the drag operation (as per windows).
all i get at the minute is a small insignificant square outline...

can anyone shed any light?

thanx,
a.

Drag And Drop In Treeview
Hi all,

Please show me how to drag and drop an item in the treeview.

Thanks a lot.

TreeView Drag And Drop In VB6
Does the treeview control that comes with VB6 have drag and drop capability?

Treeview Drag And Drop
How to make a drag and drop that can move the nodes around AND also add files in them , i have a playlist which needs to be able to add files through drag and drop through windows but also need to move the items allready added around (diffrent parents etc etc) how to do both in 1 treeview? :S

TreeView Drag Text
Hi,

I am having trouble with ms treeview, I currently have drag and drop working but want to have an image of the node text dragged to the new control. DragImage will only do a picture not the text which can change at run time so no good. I have looked at tvdragdrop.zip example and was confused, I don't want to move the nodes within the treeview either.

Any ideas as I cannot think of any

Thanks

TreeView Drag And Drop
I am having a problem with drag and drop from a treeview, unless you first click the node you want to move then click again and hold drag to new location it does not work. if you try to drag an unselected node, the dragdrop does do grab it. I am current using the OLE auto DragDrop feature of TreeView to a flexgrid



Joolz

Treeview Drag And Drop
does anyone know.......


How do I drag an item in a treeview from one parent item to another??


Thanks,
M

Drag Nodes Within Treeview
I would like to beable to drag certain nodes (only ones that key starts with "p") to other folders. searching on the forums ive only seen code that will drag from Listviews to treeviews etc. ive tried to adapt this for the treeview with no luck

this is an example of what the treeview will contain, i want to beable to move the node that begin with p into different machines (fdb, geka, aps)


VB Code:
With TV    'root    .Nodes.Add , , "root", "Root"        .Nodes.Add "root", 4, "aps", "APS Topline"            .Nodes.Add "aps", 4, "p12|100x10flat|85|8.0|hr12|id234", "P12 100x10 Flat x 80 - 8.0 - HR12"            .Nodes.Add "aps", 4, "p25|130x15flat|150|3.0|hr11|id21", "P25 130x15 Flat x 150 - 3.0 - HR13"            .Nodes.Add "aps", 4, "p94|120x25flat|501|9.0|hr9|id34", "P94 120x25 Flat x 501 - 9.0 - HR9"        .Nodes.Add "root", 4, "geka", "Geka"            .Nodes.Add "geka", 4, "p94|100x10flat|85|8.0|hr12|id153", "P94 100x10 Flat x 80 - 8.0 - HR12"            .Nodes.Add "geka", 4, "p41|130x15flat|150|3.0|hr11|id75", "P41 130x15 Flat x 150 - 3.0 - HR13"            .Nodes.Add "geka", 4, "p37|120x25flat|501|9.0|hr9|id34", "P37 120x25 Flat x 501 - 9.0 - HR9"        .Nodes.Add "root", 4, "fdb", "FDB"            .Nodes.Add "fdb", 4, "p45|100x10flat|85|8.0|hr12|id112", "P45 100x10 Flat x 80 - 8.0 - HR12"            .Nodes.Add "fdb", 4, "p47|130x15flat|150|3.0|hr11|id4", "P47 130x15 Flat x 150 - 3.0 - HR13"            .Nodes.Add "fdb", 4, "p97|120x25flat|501|9.0|hr9|id74", "P97 120x25 Flat x 501 - 9.0 - HR9"End With

Copyright © 2005-08 www.BigResource.com, All rights reserved