ReleaseItem Method (ListView)

Class

ListView.

Action

Releases the mouse on an item in the listview.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

listview.ReleaseItem (Item [, iButton, iXpos, iYpos])
Variable Description
Item The item to release. STRING or INTEGER.
iButton Optional: The mouse button to press: Windows: 1 for left (default), 2 for right, and 3 for center. INTEGER.
iXpos Optional: The horizontal coordinate. INTEGER.
iYpos Optional: The vertical coordinate. INTEGER.

Notes

  • ReleaseItem scrolls the specified item into view and releases the mouse over the item. The optional arguments allow you to specify the button to release and the offset within the item of the location of the release.
  • ReleaseItem is primarily useful for scripting drag and drop operations.
  • The ReleaseItem method is not available in the ListViewEx class, which is the equivalent of the ListView class on the Open Agent. To achieve the same functionality for a listview on the Open Agent, use the Click method of the AnyWin class and the GetItemRect method of the ListViewEx class.

Example

MyDialog.MyTreeView.PressItem ("/root/child/grandchild")
MyDialog.MyTreeView.ReleaseItem
("listview item to drop treeview item on")