Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unexpected Drag and Drop Events

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
eduigal



Joined: 19 Mar 2007
Posts: 6

PostPosted: Tue Mar 20, 2007 10:14 am    Post subject: Unexpected Drag and Drop Events Reply with quote

I have odd problem with the drag and drop, when i use my own events to handle the rows drag and drop the an unexpected drag and drop event fired (when i make structureal changes).
Does structureal changes in the tree can cause drag and drop events to fire?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Mar 20, 2007 9:46 pm    Post subject: Reply with quote

Quote:
Does structureal changes in the tree can cause drag and drop events to fire?


No - the only thing that should cause drag/drop events to fire is user interaction. What event is being fired? Can you reproduce this in a sample you could email to us?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
eduigal



Joined: 19 Mar 2007
Posts: 6

PostPosted: Wed Mar 21, 2007 6:44 am    Post subject: Reply with quote

I will try to reproduce this in a sample code, what about returning from open file dialog that opened above(hides the virtual tree) the virtual tree?it is possible that some mouse actions cause the drag and drop event to fire?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Mar 21, 2007 8:38 am    Post subject: Reply with quote

Mouse events may possibly cause the events to fire. Put a break point in your event handler and take a look at the call stack - that may tell you something.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
eduigal



Joined: 19 Mar 2007
Posts: 6

PostPosted: Wed Mar 21, 2007 3:45 pm    Post subject: Reply with quote

I did it and the call stack took me back to the main thread message loop.

I clear the GetRowDropEffect event (let virtual tree to handle it) and handle myself the other events and it fixed the problem for me.

is it possible that GetRowDropEffect event cause the problem?
here is the method:
Code:
      private void mVirtualTree_GetRowDropEffect(object sender, Infralution.Controls.VirtualTree.GetRowDropEffectEventArgs e)
      {
         e.DropEffect = DragDropEffects.Move;
      }
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Mar 21, 2007 9:11 pm    Post subject: Reply with quote

The only time the GetRowDropEffect event is fire is during a drag operation (from either the DragEnter or DragOver or DragDrop events). The drag operation could be initiated from a control other than VirtualTree - then if you drag your mouse over VirtualTree you would receive these events.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
eduigal



Joined: 19 Mar 2007
Posts: 6

PostPosted: Thu Mar 22, 2007 7:54 am    Post subject: Reply with quote

Thanks for your help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group