Cancels a potential drag operation.
Usage
Set_Property(OLECtrlEntID, "OLE.Cancel", Boolean)
Values
[True | False]
Default: False
Remarks
The Cancel property is automatically set to 0 before the OnDragStart event is fired. If the drag operation is not desired, then setting this property to 1 during the OnDragStart event will prevent the drag from occurring.
It is much easier to set drag and drop behavior using the DragCondition, DropCondition, ItemDraggable, or ItemDroppable properties. The OnDragStart event is useful only when the drag and drop rules are more complex.
Example
OLE_TREE.OnDragStart: // Get the list of items to be dragged Items = Param1 Convert ',' to @FM in Items // Don't allow users to drag if any of the items are of the "Group" class Cancel = 0 Pos = 1 Flag = "" Loop Remove Item From Items At Pos Setting Flag While Item NE "" AND Cancel EQ 0 Class = Get_Property(CtrlEntId, "OLE.ItemClass[":Item:"]") Cancel = Class _EQC "Group" Repeat // Cancel if need be Set_Property(CtrlEntId, "OLE.Cancel", Cancel) return
See Also
DragCondition, DropCondition, ItemDraggable, ItemDroppable, OnDragStart