Community
Participate
Working Groups
From Ryan Manwiller on eclipse corner: The item is dropped in the wrong place if the original item dragged has been scrolled out of view. The problem is that when the item is dropped, the tree is first scrolled to show the original item, then the item is dropped on the current item under the mouse pointer (which is now wrong). This is obstructing our use of SWT tree with drag-n-drop. I'm hoping this can be fixed at the SWT Tree instead of having to implement some workaround (does anyone know of any?). Thanks. You can see this behavior with the SWT FileViewer example. 1. Create enough directories under temp, so that you can drag and drop one to another and cause scrolling. Say, a, b, c, d, ..etc... 2. Size the FileViewer to ensure scrolling will occur and the top item will be out of view. 3. Using the FileViewer example, drap the top directory (a) downward until (a) is out of view. 4. Drop the item. 5. Notice that the Tree shows (a) before actually dropping the item, thus the item is dropped in the wrong place. NOTES: VI (12/09/2001 8:30:45 AM) Note, the example could be modified to remember the selection in the DragOver event. VI (12/09/2001 11:36:26 AM) The best solution I can see is to remove the restore selection behavior on dragLeave/drop. I think this is a reasonable thing to do. Alternately, we can restore the selection after the dropAccept and drop listeners have been notified. Should we do it and in what stream? VI (25/09/2001 8:10:18 AM) I modified the FileViewer example to remember the dragged item in the Drag over event - temporary work around.
PRODUCT VERSION: 1.0 134
Fixed a long time ago.