Class
ListBox,
ListView, and
TreeView.
Action
Releases an object over an item in a list box, listview, or treeview control.
Availability
Windows operating systems.
This functionality is supported only if you are using the Classic Agent.
Syntax
window.EndDrag (item)
Variable
|
Description
|
item
|
The item over which another object is released.
STRING or
INTEGER.
|
Notes
- The
EndDrag method drags objects to logical locations, that is, to identifiable items in a list box, listview, or treeview. An
EndDrag method must be paired with a
BeginDrag or a
BeginDragAt method.
- The drag operation can occur between different windows and applications.
- The methods
BeginDrag and
EndDrag are not available in the
ListViewEx class, which is the equivalent of the
ListView class on the Open Agent. To achieve the same functionality on the Open Agent, use the methods
PressMouse and
ReleaseMouse of the
AnyWin class. For example:
MainWin("Exploring*").ListView("Contents of 'C:\test'").PressMouse (MB_LEFT, 1, 1)
MainWin("Exploring*").ListView("Contents of 'C:\test'").ReleaseMouse (MB_LEFT, 3, 3)
Example
The following example illustrates the use of
BeginDrag and
EndDrag to move the file
Test.t from one Microsoft Explorer window (listview) to the
Testing folder in another window (treeview).
WinWin("Exploring*").ListVie("Contents of 'C:\test'").BeginDrag (1, "Test.t")
MainWin("Exploring*").TreeView("All Folders").EndDrag ("/Desktop/My Computer/ (C:)/Win95/Personal/Testing")