Community
Participate
Working Groups
For a while I am seeing a weird bug, where the scrollbar thumb of a Tree shows on the bottom, although it should be on top. As soon as I move the mouse over the Tree, the thumb moves up to the correct position (see the two screen shots). I tried to get this into a snippet, but was unable to reproduce outside of RSSOwl. It is reproducable every time in RSSOwl. What I have found out so far is: - Its unrelated to using Custom Owner Drawn - Its related to using Columns - Its related to having parent tree items with childs And most importantly: Its related to executing a UIJob from inside a Job that sets the input to the Viewer. That is, executing a display.asyncExec() from a Thread. I was unable to reproduce in RSSOwl 2 as soon as I changed the UIJob to use display.syncExec AND executing it from the UI Thread instead a Job. Any ideas where I could look into to find out more? Ben
Created attachment 81169 [details] Scroll Thumb initially
Created attachment 81170 [details] Scroll Thumb after mouse-over
Interesting. It seems to be related to using: TreeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS); If I comment out that line, the problem is gone. My initial guess is that expanding the items causes the Tree to scroll until the last expanded element becomes visible (this is OS behavior at least on windows). But then for some reason, the scrollbar stays at this position, while the first item shows. Wasn't there a complex hack in 3.3 to support expanding items without scrolling? Maybe thats related to this UI issue.
There was. What the #$%#$% does TreeViewer.setAutoExpandLevel() do? Wait, I'll go check the code ...
From quicky inspecting the code, dancing might occur because redraw is not turned off when all items are expanded. It doesn't help that Control.update() is performed after the setExpanded(), causing damage for each expand to be processed rather than merged when we get back to the event loop. Having said that, the "no scroll hack" should not leave the scroll bar in a bad state at the bottom of the control.
Is your content lazy?
The "don't scroll fix" was bug 159586.
Can you hack the snippet from that bug report to show the problem or write a TreeViewer example that does it? I tried a bit but couldn't get it to happen.
I am not using SWT.VIRTUAL for the Tree or using a ILazyContentProvider, nope. I will proceed trying to get a snippet right. Its good that its reproducable _everytime_ in RSSOwl, so its only a question of time :)
Can't wait. I didn't expect to fix the no scroll thing without some fall out.
Created attachment 81205 [details] Dancing Tree Snippet Got it (see attachment). It depends on the actual number of parents and items. Say hello to SWT-Bug-of-the-year (at least for me ;-) ).
Fixed > 20071026 The problem was that the when redraw was turned back on in a tree with columns, the scroll bar of the was not updated. By the way, nothing "dances" for me. Are you still seeing this somewhere?
> By the way, nothing "dances" for me. Are you still seeing this somewhere? Nope, looks good now.