DragDrop

Description

PowerBuilder only Occurs when the user drags an object onto the control and releases the mouse button to drop the object.

PowerBuilder event information Event ID: pbm_dwndragdrop

Argument

Description

source

DragObject by value. A reference to the control being dragged.

row

Long by value. The number of the row the pointer was over when the user dropped the object.

If the pointer was not over a row, the value of the row argument is 0. For example, row is 0 when the pointer is outside the data area, in text or spaces between rows, or in the header, summary, or footer area.

dwo

DWObject by value. A reference to the control under the pointer within the DataWindow when the user dropped the object.

Returns

There are no special outcomes for this event. The only code is:

Usage

Obsolete methods in PowerBuilder You no longer need to call the DraggedObject method in a drag event. Use the source argument instead.

Examples

Example 1

This example for the DragDrop event for a DataWindow checks whether the source object is a DataWindow control. If so, it finds out the current row in the source and moves it to the target:

DataWindow ldw_Source


IF source.TypeOf() = DataWindow! THEN

		ldw_Source = source

		IF row > 0 THEN

			ldw_Source.RowsMove(row, row, Primary!, &

				This, 1, Primary!)

		END IF

END IF

See also