Search
ListContainer.dragOver Event
See Also
 






Raised when an item is dragged over the control.

Namespace: MindFusion.Common.UI
File: ListContainer.js

 Syntax

JavaScript  Copy Code

EventDispatcher dragOver

 Event Data

The event handler method receives the following arguments:
sender
A ListContainer instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
A DragDropEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code creates a new ListView and handles its dragOver event. The ListView class derives from ListContainer:

JavaScript  Copy Code

// create the ListView control
var nodeList = new ui.ListView(document.getElementById("nodeList"));

//attach event handler to the dragDrop event
nodeList.dragOver.addEventListener(dragOverEventHandler);


function dragOverEventHandler(sender, args)
{
  if(args.dragItem.title == "New Node")
         {
            var tip = new ui.Tooltip(args.dragItem.element);
            tip.text = "Drop to create a new node";
            tip.show();
         }
}

 See Also