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 

Inadvertant Drag/Drop

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



Joined: 27 Jan 2008
Posts: 43

PostPosted: Thu Nov 11, 2010 6:12 pm    Post subject: Inadvertant Drag/Drop Reply with quote

I find that if I move my mouse slightly as I select a row (and the selection point is near the border between two rows), I can initiate a drag/drop (move) and not realize it, inadvertantly hiding a row.

I don't seem to have ready access to DragStart or equivalent. Can you suggest a solution?

Thanks.

Jeff
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Nov 11, 2010 10:00 pm    Post subject: Reply with quote

What version of Virtual Tree are you using?

I wasn't able to replicate anything like what you are seeing with any of the sample projects. The Simple Tree sample fully supports drag and drop - yet however much I tried clicking near the edges of rows and moving the mouse as I clicked I was unable to "inadvertantly" initiate a drag and drop while just selecting. You have to make drag movement over half a row wide before a drag is initiated - and even then if you don't want to continue you can just drag back over the origin row.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
jaherbert



Joined: 27 Jan 2008
Posts: 43

PostPosted: Thu Nov 11, 2010 10:41 pm    Post subject: Reply with quote

I'm using 3.15.1.

And I can replicate it on the samples if I do the equivalent of rapid drag/drop, moving the mouse while clicking and releasing quickly.

So I think it depends on what you mean by "just selecting." Some of us are sloppier selectors, it seems.

And half a row wide seems like a reasonable default.

I'd be inclined to offer some warning if the drop takes place within some specified duration after the drag, but I'm not sure how to access the start of the drag.

And, if I must code this myself (via MouseMove), I'd still like to use your cursor code.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Nov 11, 2010 11:00 pm    Post subject: Reply with quote

You can actually set the DragSensitivity property of the VirtualTree - which is the number of pixels that the mouse has to move with the button down before it is considered a drag.

If you want to implement some form of time base blocking of drop operations then you could override the VirtualTree OnMouseDown method and store the time the mouse was pressed and override OnRowDrop method and check the time since the mouse was pressed and only allow call the base method if time span meets your criteria.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
jaherbert



Joined: 27 Jan 2008
Posts: 43

PostPosted: Fri Nov 12, 2010 2:22 am    Post subject: Reply with quote

Doh! And thanks.
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