Type | Description | |||
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 ) |
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:
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 |
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 |
<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 |