Community
Participate
Working Groups
Create a Tree with some items and implement DND support as explained in this Snippet: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet91.java?rev=HEAD&content-type=text/vnd.viewcvs-markup Now expand some items so that vertical scrollbars are appearing. When draggin an item to the bottom, the Tree is not scrolling. It is currently not possible to Drag an Item to a position that is out of view. I would have thought that DND.FEEDBACK_SCROLL enables automatic scrolling, in case the user drags an Item to the bottom but it does'nt. To see how its working, open Bookmark Manager in Firefox, expand items until the Scrollbars are showing and drag a Bookmark to the Bottom. The Tree is scrolling. Ben
Just noticed that the Tree is scrolling, but not with a reasonable speed. In Firefox the Tree scrolls as if the Scrollbars where used. In SWT only the next Item is selected and brought into View. Ben
Try dragging a folder in the Windows File Explorer. I think it behaves in the same way that SWT behaves. The next item is scrolled into view - it is not the same as using the scrollbars. What I can do is decrease the amount of time we wait before scrolling. Ideally, I would like to get this value from the operating system because some users do not want their system to react too fast. Right now it is hardcoded at 500 ms between items. See TreeDragUnderEffect.
I compared Eclipse with Windows Explorer. Eclipse: I am dragging a class from one package to another one that is not visible. When dragging to the end of the Tree, 50% of the next TreeItem becomes selected and then after a short amount of time, the selection moves forward, thereby scrolling the Tree. I think the "short amount of time" is too long, if possible maybe reduce that value (if that is those 500ms?). Windows: I am dragging a folder from one to another one, not visible. First difference is that Windows is not selecting the next Folder on bottom, it just scrolls with a greater speed than Eclipse. Maybe this difference is just because of the "slow" 500ms and the selection that occurs in SWT, but not in Windows. Basically the selection is not that bad, but the scrolling speed is kind of slow. Ben
Another thought: Maybe leave the initial delay hardcoded to 500ms, but as soon as the scrolling has began, decrease the delay, since it is now obvious that the user wants to scroll. Ben
I have changed the delay between scrolls to 150 milliseconds. I will continue to investigate getting the delay time from the OS and/or using an accelerated scroll time only after scrolling has started. However, closing this bug for now. Please reopen if 150 ms is still too slow.
Looks pretty good now, thanks! Ben