Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DragDrop – PB Docs 150 – PowerBuilder Library

DragDrop – PB Docs 150

DragDrop event

The DragDrop event has different arguments for different
objects:

Object

See

ListBox, PictureListBox, ListView, and Tab
controls

Syntax 1

TreeView control

Syntax 2

Windows and other controls

Syntax 3

For information about the DataWindow control’s DragDrop
event, see the DataWindow Reference or the online Help.

Syntax 1 For ListBox, PictureListBox, ListView, and Tab controls

Description

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

Event ID

Event ID

Objects

pbm_lbndragdrop

ListBox, PictureListBox

pbm_lvndragdrop

ListView

pbm_tcndragdrop

Tab

Parameters

Argument

Description

source

DragObject by value (a reference to the
control being dragged)

index

Integer by value (the index of the target
ListView item)

Return Values

Long. Return code choices (specify in
a RETURN statement):

  • 0 Continue
    processing

Usage

Obsolete functions

You no longer need to call the DraggedObject function
in a drag event. Use the source argument instead.

Examples

For ListView controls, see the example for BeginDrag.

This example inserts the dragged ListView item:

See Also

Syntax 2 For TreeView controls

Description

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

Event ID

Event ID

Objects

pbm_tvndragdrop

TreeView

Parameters

Argument

Description

source

DragObject by value (a reference to the
control being dragged)

handle

Long by value (the
handle of the target TreeView item)

Return Values

Long. Return code choices (specify in
a RETURN statement):

  • 0 Continue
    processing

Usage

Obsolete functions

You no longer need to call the DraggedObject function
in a drag event. Use the source argument instead.

Examples

This example inserts the dragged object as a child
of the TreeView item it is dropped upon:

See Also

Syntax 3 For windows and other controls

Description

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

Event ID

Event ID

Objects

pbm_bndragdrop

CheckBox, CommandButton, Graph, InkEdit,
InkPicture, Picture, PictureHyperLink, PictureButton, RadioButton

pbm_cbndragdrop

DropDownListBox, DropDownPictureListBox

pbm_dragdrop

DatePicker, MonthCalendar

pbm_endragdrop

SingleLineEdit, EditMask, MultiLineEdit,
StaticText, StaticHyperLink

pbm_omndragdrop

OLE

pbm_prndragdrop

HProgressBar, VProgressBar

pbm_rendragdrop

RichTextEdit

pbm_sbndragdrop

HScrollBar, HTrackBar, VScrollBar, VTrackBar

pbm_uondragdrop

UserObject

pbm_dragdrop

Window

Parameters

Argument

Description

source

DragObject by value (a reference to the
control being dragged)

Return Values

Long. Return code choices (specify in
a RETURN statement):

  • 0 Continue
    processing

Usage

When a control’s DragAuto property is true,
a drag operation begins when the user presses a mouse button.

Obsolete functions

You no longer need to call the DraggedObject function
in a drag event. Use the source argument instead.

Examples

[Example 1]

In this example, the code in the DoubleClicked event for the DataWindow dw_orddetail starts
a drag operation:

Then, in the DragDrop event for a trashcan Picture
control, this code deletes the row the user clicked and dragged
from the DataWindow control:

[Example 2]

This example for a trashcan Picture control’s DragDrop
event checks whether the source of the drag operation is a DataWindow.
If so, it asks the user whether to delete the current row in the
source DataWindow:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x