DoubleClicked  DragEnter

Chapter 8: DataWindow Events

DragDrop

Description

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

PocketBuilder 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:

Examples

Example 1

PocketBuilder 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





Copyright © 2004. Sybase Inc. All rights reserved. DragEnter

View this book as PDF