event AllowAutoDrag (Item as Long, InsertA as Long, InsertB as Long, Cancel as Boolean)
Occurs when the user drags the item between InsertA and InsertB.

TypeDescription
Item as Long A long expression that indicates the item being dragged.
InsertA as Long A long expression that specifies the index of the item to insert the dragging Item after. If -1, it indicates that no item after.
InsertB as Long A long expression that specifies the index of the item to insert the dragging Item before. If -1, it indicates that no item before.
Cancel as Boolean A Boolean expression that specifies whether the operation can continue ( this parameter is by reference )
The AllowAutoDrag event occurs when the user drags the item between InsertA and InsertB, using the AutoDrag property. The AutoDrag feature indicates what the control does when the user clicks an item and starts dragging it. For instance, using the AutoDrag feature you can let the user arrange the items in the control, or can drop the selection to a any OLE compliant applications like Microsoft Word, Excel and so on... The AllowAutoDrag event may fire when the AutoDrag property is any of the following values:

You can use the AllowAutoDrag event to cancel or continue drag and drop operation using the AutoDrag property.

The following screen shot shows the InsertA and InsertB parameters, when "Item 2" is dragging to a new position:

Syntax for AllowAutoDrag event, /NET version, on:

private void AllowAutoDrag(object sender,int   Item,int   InsertA,int   InsertB,ref bool   Cancel)
{
}

Private Sub AllowAutoDrag(ByVal sender As System.Object,ByVal Item As Integer,ByVal InsertA As Integer,ByVal InsertB As Integer,ByRef Cancel As Boolean) Handles AllowAutoDrag
End Sub

Syntax for AllowAutoDrag event, /COM version, on:

private void AllowAutoDrag(object sender, AxEXLISTLib._IListEvents_AllowAutoDragEvent e)
{
}

void OnAllowAutoDrag(long   Item,long   InsertA,long   InsertB,BOOL FAR*   Cancel)
{
}

void __fastcall AllowAutoDrag(TObject *Sender,long   Item,long   InsertA,long   InsertB,VARIANT_BOOL *   Cancel)
{
}

procedure AllowAutoDrag(ASender: TObject; Item : Integer;InsertA : Integer;InsertB : Integer;var Cancel : WordBool);
begin
end;

procedure AllowAutoDrag(sender: System.Object; e: AxEXLISTLib._IListEvents_AllowAutoDragEvent);
begin
end;

begin event AllowAutoDrag(long  Item,long  InsertA,long  InsertB,boolean  Cancel)

end event AllowAutoDrag

Private Sub AllowAutoDrag(ByVal sender As System.Object, ByVal e As AxEXLISTLib._IListEvents_AllowAutoDragEvent) Handles AllowAutoDrag
End Sub

Private Sub AllowAutoDrag(ByVal Item As Long,ByVal InsertA As Long,ByVal InsertB As Long,Cancel As Boolean)
End Sub

Private Sub AllowAutoDrag(ByVal Item As Long,ByVal InsertA As Long,ByVal InsertB As Long,Cancel As Boolean)
End Sub

LPARAMETERS Item,InsertA,InsertB,Cancel

PROCEDURE OnAllowAutoDrag(oList,Item,InsertA,InsertB,Cancel)

RETURN

Syntax for AllowAutoDrag event, /COM version (others), on:

<SCRIPT EVENT="AllowAutoDrag(Item,InsertA,InsertB,Cancel)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function AllowAutoDrag(Item,InsertA,InsertB,Cancel)
End Function
</SCRIPT>

Procedure OnComAllowAutoDrag Integer   llItem Integer   llInsertA Integer   llInsertB Boolean   llCancel
	Forward Send OnComAllowAutoDrag llItem llInsertA llInsertB llCancel
End_Procedure

METHOD OCX_AllowAutoDrag(Item,InsertA,InsertB,Cancel) CLASS MainDialog
RETURN NIL

void onEvent_AllowAutoDrag(int   _Item,int   _InsertA,int   _InsertB,COMVariant /*bool*/   _Cancel)
{
}

function AllowAutoDrag as v (Item  as  N,InsertA  as  N,InsertB  as  N,Cancel  as  L)
end function

function nativeObject_AllowAutoDrag(Item,InsertA,InsertB,Cancel)
return