Bug 186599 - Tree widget vertical scrollbar is not recomputed sometimes
Summary: Tree widget vertical scrollbar is not recomputed sometimes
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-11 12:37 EDT by Olivier Thomann CLA
Modified: 2019-09-06 16:03 EDT (History)
0 users

See Also:


Attachments
First screenshot (112.41 KB, image/png)
2007-05-11 12:38 EDT, Olivier Thomann CLA
no flags Details
Second screenshot (112.08 KB, image/png)
2007-05-11 12:38 EDT, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2007-05-11 12:37:27 EDT
Using I20070508-0800, I got a weird behavior of the tree widget in the debugger variable view.
When the last item (for the variable "low" on the screenshot) has been added, the vertical scrollbar has not been recomputed resulting in a cut row.
See the attached screenshots.
If I can reproduce it again, I'll provide a screenshot after it is back to normal.

I could get back a good vertical scrollbar, by clicking in the "value" column of the last row.
Comment 1 Olivier Thomann CLA 2007-05-11 12:38:22 EDT
Created attachment 66902 [details]
First screenshot
Comment 2 Olivier Thomann CLA 2007-05-11 12:38:40 EDT
Created attachment 66903 [details]
Second screenshot
Comment 3 Steve Northover CLA 2007-05-14 21:41:39 EDT
Here is some test code that shows the problem:


import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class PR_186599 {
	static final int COUNT = 1000;
	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setLayout(new RowLayout());
		final Tree tree = new Tree(shell, SWT.NONE | SWT.VIRTUAL);
		tree.setLayoutData (new RowData (100, 200));
		tree.addListener(SWT.SetData, new Listener() {
			public void handleEvent(Event event) {
				TreeItem item = (TreeItem) event.item;
				item.setText("Item " + event.index);
				if (event.index == tree.getItemCount () - 1) {
					item.setText("A very long item that will need to scroll");
				}
			}
		});
		tree.setItemCount(COUNT);
		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
}
Comment 4 Steve Northover CLA 2007-05-14 21:42:46 EDT
Note that if you click on the line down arrow in the scroll bar, you can scroll to the last item but you cannot drag.  Is this the behavior you are seeing?
Comment 5 Olivier Thomann CLA 2007-05-14 21:51:29 EDT
What I am seeing is a little worse than that :-).
When I clicked on the last item, I still cannot see it completely. Maybe this is due to the two columns.
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:03:55 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.