AutoDragging Event, SftTree Object
Dragging in progress (automatic DragMethod only).
|VB.NET||Private Sub object_AutoDragging(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.AutoDragging|
|VB||Private Sub object_AutoDragging(ByVal ItemIndex As Long, ByVal Button As Integer, ByVal Shift As Integer, Allowed As Boolean)|
|C#.NET||void object_AutoDragging(object sender, EventArgumentType e);|
|VC++||void OnAutoDraggingobject(long ItemIndex, short Button, short Shift, VARIANT_BOOL* Allowed);|
|C||HRESULT OnAutoDraggingobject(long ItemIndex, short Button, short Shift, VARIANT_BOOL* Allowed);|
A SftTree object.
The zero-based index where the current drop target is located. This value may be -1 if there is no current drop target.
The button that is pressed during the event (see SftTreeButtonConstants). The button argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. Only one of the bits is set, indicating the button that caused the event.
|constSftTreeLeftButton||1||The left mouse button was pressed.|
|constSftTreeRightButton||2||The right mouse button was pressed.|
|constSftTreeMiddleButton||4||The middle mouse button was pressed.|
The state of the SHIFT, CONTROL and ALT keys during the event (see SftTreeKeyConstants). A bit is set if the key is down. The Shift argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. The Shift variable indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed.
|constSftTreeShiftMask||1||The SHIFT key was pressed.|
|constSftTreeCtrlMask||2||The CONTROL key was pressed.|
|constSftTreeAltMask||4||The ALT key was pressed.|
Set to True to allow the item at ItemIndex to be a valid drop target, otherwise set to False. This value is passed to the AutoEndDragging event as Allowed parameter. This value has no effect on the current mouse pointer used. The mouse pointer must be modified using the MousePointer property.
The AutoDragging event occurs when dragging in progress (automatic DragMethod only).
This event is only available if the DragMethod property is set to dragSftTreeAuto and is suitable for drag & drop within one tree control only. If drag & drop between controls is desired, the container (i.e. Visual Basic, Visual C++, etc.) must implement the necessary drag & drop support (see DragMethod) or OLE drag & drop should be used instead.
The drop target (and any other tree control properties) cannot be modified during this event. It signals that the mouse cursor has moved and that the user is attempting to drag the currently selected item(s). You can override the MousePointer property in response to this event to provide visual feedback to the user.
The current drop target is displayed using the style defined using the Items.DropHighlightStyle property.
See Also SftTree Object | Object Hierarchy