Search
FlowChart.DragDropMode Property
See Also
 



Gets or sets a value indicating how FlowChartX responds to OLE drag-and-drop operations.

 Syntax

VB6  Copy Code

Public Property Get DragDropMode() As EDragDropMode
Public Property Let DragDropMode( _
    ByVal Value As EDragDropMode _
)

C++  Copy Code

public:
EDragDropMode get_DragDropMode ()
void put_DragDropMode (
    EDragDropMode value
)

 Property Value

A member of the EDragDropMode enumeration. The default is drAutoAccept.

 Remarks

Gets or sets how the control responds to OLE drag-and-drop operations and what events are raised in response. One of the following values can be used:

  • drAutoAccept - text dropped into a box, a table caption or a table cell is automatically accepted and the respective object properties are set to the dropped text. In similar manner dropping an image over a node automatically sets its Picture property to that image. Dropping an image into an empty area sets the background image of FlowChartX. One of the following events are raised, depending on the drop destination: DropAcceptedByBox, DropAcceptedByTable, DropAcceptedByTableCell, DropAccepted. These events provide as arguments the type of data dropped, and a reference to the object that received the data.
  • drRequestAccept - as in the first mode, textual and image data are accepted by tables and boxes, setting accordingly their properties. However validation events are raised while the drag occurs, through which drop operation can be rejected. Appropriate visual feedback is given to the user, depending on the result of a validation event. The events that may be raised are RequestDropInBox, RequestDropInTable and RequestDrop, based on the type of object under the mouse cursor. If the operation is validated and the user drops the dragged data, the same events as in drAutoAccept mode are raised too.
  • drProgrControl - in this mode full responsibility on interpreting the dragged data and the results of dropping it is left to your program. Two sets of events can be raised. While dragging any data over the flowchart area, the DragOverDoc, DragOverBox and DragOverTable are raised, depending on the item under the mouse cursor. They have as arguments the OLE IDataObject interface pointer, through which the dragged data can be queried and retrieved. In addition the mouse position in document coordinates is passed, along with a key-state parameter and an output effect parameter. Through the effect parameter you can give OLE clue on the outcome of the operation, and the kind of visual feedback that should be displayed to the user. When the dragged object is dropped the following events may be raised: DropInBox, DropInTable and DropInDoc. They receive the same parameters as their Drag* counterparts. When working in this mode, you can use ObjectFromPoint method to find out if there is an item under the mouse cursor.
  • drProgrControVB - same as the above, but the events raised from this mode receive IVBDataObject parameter. This interface is automation-compatible and can be used by Visual Basic applications. The events that can be raised in this mode are DragOverDocVB, DragOverBoxVB, DragOverTableVB, DropInBoxVB, DropInTableVB and DropInDocVB.

 See Also