ZennoLab Assemblies Documentation
DragDrop Method (HtmlElement)
Example 

Type: Zennolab.CommandCenter.HtmlElement

The html element for drop event.

Type: System.Int32

The x coordinate inside element's area for rise drag event. Default value is -1.

Type: System.Int32

The y coordinate inside element's area for rise drag event. Default value is -1.

Type: System.Int32

The x coordinate inside element's area for rise drop event. Default value is -1.

Type: System.Int32

The y coordinate inside element's area for rise drop event. Default value is -1.

Performs the drag and drop events for specified elements.
Syntax
public void DragDrop( 
   HtmlElement element,
   int dragX,
   int dradY,
   int dropX,
   int dropY
)

Parameters

element

Type: Zennolab.CommandCenter.HtmlElement

The html element for drop event.

dragX

Type: System.Int32

The x coordinate inside element's area for rise drag event. Default value is -1.

dradY

Type: System.Int32

The y coordinate inside element's area for rise drag event. Default value is -1.

dropX

Type: System.Int32

The x coordinate inside element's area for rise drop event. Default value is -1.

dropY

Type: System.Int32

The y coordinate inside element's area for rise drop event. Default value is -1.

Remarks
In case there is any coordinate is -1, will be used the central position of the element on specified axis.
Example
The following code example demonstrates uses of the DragDrop method.
// find element fo drop event
HtmlElement dropHe = instance.ActiveTab.FindElementById("some_id");
// if element is exist
if (!dropHe.IsVoid)
{
    // find element for drap event
    HtmlElement dragHe = instance.ActiveTab.FindElementById("any_id");
    // if element is exist
    if (!dragHe.IsVoid)
    {
        // rise drag and drop events
        // drop dropHe (rise event in position x = 10, y = 30) to the specified place (50, 50)
        dragHe.DragDrop(dropHe, 10, 30, 50, 50);
    }
}
// find element fo drop event
$dropHe = $instance->ActiveTab->FindElementById("some_id");
// if element is exist
if (!$dropHe->IsVoid)
{
    // find element for drap event
    $dragHe = $instance->ActiveTab->FindElementById("any_id");
    // if element is exist
    if (!$dragHe->IsVoid)
    {
        // rise drag and drop events
        // drop dropHe (rise event in position x = 10, y = 30) to the specified place (50, 50)
        $dragHe->DragDrop($dropHe, 10, 30, 50, 50);
    }
}
Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven

See Also

Reference

HtmlElement Class
HtmlElement Members
FindChildByAttribute Method
FindChildById Method
FindChildByName Method
FindChildByTag Method
FindChildByXPath Method

Send Feedback