Drag: function (sender, args)
sender. Event source.
args. Event information.
The Drag event occurs on pressing and holding the left mouse button.
To execute the example, connect the PP.js library and the table of the PP.css visual styles. Seebelow the Javascript code which is used to locate a button on the HTML page.
<script type="text/javascript">
function Drag(data) {
this.data = data;
this.onDrag = function (sender, args)//The Drag event handler
{
alert("onDrag")
}
}
var D = new Drag("Drag event example");
var b1 = new PP.Ui.Button({
Content: "Button",
Drag: D.onDrag});
b1.addToNode("btn1");
</script>
After executing the example on pressing and holding the right mouse button the OnDrag message is displayed.
The event use is given using the example of the ListBox component and described in the Example of Creating the ListBox Component page.
See also: