Drag and drop visual feedback settings.

Usage

Set_Property(OLECtrlEntID, "OLE.DropBehavior", OptionValue)

Values

OptionValue can be set to one of the following valid options:

ValueAbbr.Description
NoneNThe user sees no visual feedback
AddAThe user sees valid drop items highlight when dragging over them
InsertIThe user sees an insertion marker between two items
ControlCThe user sees the entire control light up with an optional message

Default: Add

Remarks

The DropBehavior property establishes the kind of feedback the user will see when dragging tree items over the control. Choose the behavior that matches the intended drop action.

Add

Use this drop behavior when you want the user to understand that dropping the dragged items onto the target item will add them as children of the target. This is the ideal behavior when you have sorted items.

Insert

Use this drop behavior when you want to allow the user to move items to any arbitrary location. As the user drags the items over the control an insertion marker will appear between items. This behavior is best suited for scenarios in which the user is given control over the order of items.

Control

Use this drop behavior when you plan to enforce the structure of the entire tree yourself. When the user drags over the control, it will become highlighted and display an optional prompt to the user. This allows the user to drop items onto the control without worry of precision; you take care of where the items end up. This behavior is ideal for maintaining synchronized trees or for trees that act as temporary holding places.

None

Of course, you can always specify no feedback whatsoever. This is essentially the same as indicating that you never want to receive drag and drop items.

There are other properties, methods, and events necessary to implement a complete drag and drop solution. See Drag and Drop for more details.

Example

// Highlight the whole control when the user drags over it 
Set_Property(@Window:".OLE_TREE", "OLE.DropBehavior", "Control") 

// Show an insertion marker as the user drags 
Set_Property(@Window:".OLE_TREE", "OLE.DropBehavior", "Insert")

See Also

DropConditionDropSourcesAutoDrop

  • No labels