Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

DropHighlight Property, SftTree Object

Defines the index of the current drop target of a drag & drop operation.

Deprecated - Provided for compatibility with earlier versions only - Use Items.DropHighlight instead

Syntax

Get

VB.NETItemIndex = object.DropHighlight As Integer
VBItemIndex = object.DropHighlight As Long
C#.NETint ItemIndex = object.DropHighlight;
VC++long ItemIndex = object->DropHighlight;
long ItemIndex = object->GetDropHighlight();
CHRESULT object->get_DropHighlight(long* ItemIndex);

Put

VB.NETobject.DropHighlight = ItemIndex As Integer
VBobject.DropHighlight = ItemIndex As Long
C#.NETint object.DropHighlight = ItemIndex;
VC++long object->DropHighlight = ItemIndex;
void object->PutDropHighlight(long ItemIndex);
CHRESULT object->put_DropHighlight(long ItemIndex);

object

A SftTree object.

ItemIndex

Defines the index of the current drop target of a drag & drop operation. This value can be -1 to clear the drop target.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Items.DropHighlight instead

The DropHighlight property defines the index of the current drop target of a drag & drop operation.

The DropHighlight property is used to highlight the target of a drag & drop operation. There can be only one drop target at any one time. By setting the DropHighlight property to a new item, the previous item is no longer a drop target and is no longer highlighted.

The Items.DropHighlightStyle property can be used to control the appearance of the target item. Depending on the Items.DropHighlightStyle property value, the ItemIndex specified is the actual drop target or the insertion point. If used as an insertion point, the ItemIndex value can be set to the number of items in the tree control, which moves the insertion point to the end of the list of items.

By setting the DropHighlight property to -1, the current drop target is cleared.

A drag & drop operation always starts at the current location described by the Items.Current property. It is the application's responsibility to visually implement the drag & drop operation. When the operation involves the current tree control, this is accomplished by using the Items.HitTest method and the Items.DropHighlight property. If dragging to another tree control, the target tree control's Items.HitTest method and Items.DropHighlight property have to be used. If dragging to another control type (list box, edit control, etc.), other means may have to be used as implemented by the target control.

Once a drag & drop operation ends, the DropHighlight property has to be cleared by setting ItemIndex to -1. This removes the highlight indicator from the target item.

If the DropHighlight property is set to the first (or last) item currently visible in the tree control's client area, the tree control automatically scrolls up (or down) one item. This allows a user to drag items to a target item which has to be scrolled into view first. The contents of the tree control will scroll in the given direction until the DropHighlight property is set to -1 or to the index of an item which is not the first (or last) item visible.

See Also SftTree Object | Object Hierarchy


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