Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Drag Drop (Read 1067 times)
ytheaudin
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Oct 7th, 2009
Drag Drop
Oct 7th, 2009 at 8:21pm
Print Post  
Qui Hi
I would like to select when DragOver a single node, and link code automatically attached selects each node on which the mouse moves
thank you for your help
Here is my code:
e.Effect = DragDropEffects.Move
Dim p As System.Drawing.Point = DiagramView1.PointToClient(New Point(e.X, e.Y))
Dim pt As System.Drawing.PointF = DiagramView1.ClientToDoc(New Point(p.X, p.Y))

If Not TypeOf Diagram1.GetItemAt(DiagramView1.ClientToDoc(p), False) Is DiagramItem Then
Exit Sub
End If

Dim item As DiagramItem = Diagram1.GetItemAt(DiagramView1.ClientToDoc(p), False)
If Not item Is Nothing Then

'Debug.WriteLine(item.Tag.ToString & "<>" & ItemOld)
If item.Tag.ToString <> ItemOld.ToString Then
Debug.WriteLine(item.Tag.ToString & "<>" & ItemOld.ToString)
'ItemOld.Selected = False
item.Selected = True


ItemOld = CType(item.Tag, Guid)
End If
End If
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drag Drop
Reply #1 - Oct 8th, 2009 at 7:08am
Print Post  
Hi,

Call the diagram.Selection.Change() method if you want only one item to be selected.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint