Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

AutoDragging Event, SftTree Object

Dragging in progress (automatic DragMethod only).

Syntax

VB.NETPrivate Sub object_AutoDragging(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.AutoDragging
VBPrivate Sub object_AutoDragging(ByVal ItemIndex As Long, ByVal Button As Integer, ByVal Shift As Integer, Allowed As Boolean)
C#.NETvoid object_AutoDragging(object sender, EventArgumentType e);
VC++void OnAutoDraggingobject(long ItemIndex, short Button, short Shift, VARIANT_BOOL* Allowed);
CHRESULT OnAutoDraggingobject(long ItemIndex, short Button, short Shift, VARIANT_BOOL* Allowed);

object

A SftTree object.

ItemIndex

The zero-based index where the current drop target is located. This value may be -1 if there is no current drop target.

Button

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.

ButtonValueDescription
constSftTreeLeftButton1The left mouse button was pressed.
constSftTreeRightButton2The right mouse button was pressed.
constSftTreeMiddleButton4The middle mouse button was pressed.

Shift

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.

ShiftValueDescription
constSftTreeShiftMask1The SHIFT key was pressed.
constSftTreeCtrlMask2The CONTROL key was pressed.
constSftTreeAltMask4The ALT key was pressed.

Allowed

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.

Comments

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


Last Updated 08/13/2020 - (email)
© 2022 Softel vdm, Inc.