From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Invoked during dragging, similar to the DragOver event.
The following enums are used by the DragOverRow and DropObjectOnRow events:
|OnRow||The drop is occurring on the row itself.|
|AfterRow||The drop is occurring between rows, after the row specified. The row can be in the range of [-1, RowCount-1] and specifying -1 will insert it at the top of all the rows. This value will also be RowCount-1 if the user drags below the item list.|
|AfterAllRows||The drop is occurring after all rows in the list.|
|OnControl||The drop is occurring on the entire control, not on a particular row. This matches the previous behavior.|
Event handlers can 'retarget' a drop by altering the row, parentRow, or location parameters.
- x: The x coordinate of the drop, relative to the left of the ListBox.
- y: The y coordinate of the drop, relative to the top of the ListBox.
- obj: The data actually being dropped.
- action: The drag action, which can be things like move or copy. Constants already exist in the DragItem class for this.
- row: The proposed target row for the drop.
- parentRow: When the listbox is non-hierarchical, this will always be -1. When the Listbox is hierarchical, this is the row that the item is being dragged into. If the item is being dragged to the top level, parentRow will have a value of -1.
- location: Whether the drop is going between two rows, on the row itself or just on the control. Uses the DesktopListBox.DropLocations enum.
Returning True prevents the drop from occurring and the DragOver event from firing. Otherwise the DragOver event fires.