ZennoLab Assemblies Documentation
DragDrop Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > HtmlElement Class : DragDrop Method
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.

Glossary Item Box

Performs the drag and drop events for specified elements.

Syntax

C# 
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.
C#Copy Code
// 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);
    }
}
PHPCopy Code
// 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

See Also

© 2014 All Rights Reserved.