From MediaMonkey Wiki
Jump to navigation Jump to search

CoClass SDBTreeNode, Interface ISDBTreeNode

Property Get/Let OnDragDrop As String

Property description

Name of an event function in ISDBTreeNode::UseScript file that is called to handle drag and drop. The function is called with the following parameters:

Target tree node.
The node from which the list of tracks to be dragged originates.
List of tracks that are dragged.
is either
  • 1 - Copy - Tracks are expected to be copied.
  • 2 - Move - Tracks are expected to be moved.
if true, the drop operation should not occur, the method is only expected to return a value that indicates what kind of operation is by default expected. It can be any of values used in 'dropType' parameter and in addition the following can be used
  • 0 - No drop - tracks cannot be dropped here.
  • 3 - Just Move - Tracks can only be moved here (no copied). User cannot change the shape of cursor to copy.
  • 4 - Just Copy - Tracks can only be copied here (no moved). User cannot change the shape of cursor to move.

Example code

' The function can look like:

Function LyricistDragDrop( destNode, srcNode, SongList, DropType, Test)
  If Test Then
    LyricistDragDrop = 2         ' Move operation
    Dim i, itm
    For i=0 To SongList.Count-1
      Set itm = SongList.Item(i)
      itm.Lyricist = destNode.CustomData
  End If
End Function

Related Topics