Drag-and-drop properties, events, and functions

Drag-and-drop properties

Each PocketBuilder control has a boolean DragAuto property.

Table 2-1: DragAuto property values

Value

Meaning

true

When the object is tapped, the control is placed automatically in drag mode.

false

When the object is tapped, the control is not placed automatically in drag mode; you have to put the object in drag mode manually by using the Drag function in a script.

StepsTo specify automatic drag mode for a control in the Window painter:

  1. Select the Other property page in the Properties view for the control.

  2. Check the Drag Auto check box.

Drag-and-drop events

The drag-and-drop events listed in Table 2-2 are supported in PocketBuilder.

Table 2-2: Drag-and-drop events

Event

Occurs

BeginDrag

When the user taps in a ListView or TreeView control and begins dragging

DragDrop

When the pointer is over a target (a PocketBuilder control or window to which you drag a control) and the user stops dragging

DragEnter

When the pointer enters the boundaries of a target

DragLeave

When the pointer leaves the boundaries of a target

DragWithin

When the pointer moves within the boundaries of a target