Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Specify the default drop action during drag-drop

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensions.Net
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Sat Dec 20, 2008 5:14 am    Post subject: HOWTO: Specify the default drop action during drag-drop

When an item in your namespace extension is dragged over another location, the default (when Ctrl or Shift keys are not pressed) drop action (Move,Copy or Link) depends on the attributes that the dragged items have. However, you can specify the default drop actions using the PreferredDropEffect property in the GetDataObject method as follows:
Code:

[C#]

public override void GetDataObject(GetDataObjectEventArgs e)
{
...
...
// Set default drop action to 'Copy'
e.DataObject.PreferredDropEffect = DragDropEffects.Copy;
...
...
}

[VB.Net]

Public Overrides Sub GetDataObject(ByVal e As GetDataObjectEventArgs)
...
...
' Set default drop action to 'Copy'
e.DataObject.PreferredDropEffect = DragDropEffects.Copy
...
...
End Sub
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensions.Net All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group