Bug 224642 Scrolled form does not resize child controls when the form is resized
Build ID: I20070625-1500 Steps To Reproduce: 1. Use MultiPageEditorPart 2. In a form page create a few controls on a composite that is parented by the scrolled form. 3. Resize the editor. The controls do not get resized , but rather the editor covers them up as you shrink it. 4. Would expect the controls to be resized to fit the new size of the scrolled composite. More information: It seems to be in the ScolledCompositeLayout and ScrolledComposite classes. The minHeight gets calculated when the composite gets drawn and gets cached and never gets changed. So once the minHeight of the editor becomes < the min height composite , scroll bars appear on the editor. The layout takes the Math#max() of the minHeight of sc or the actual height. If the min height is > , then the scroll bars appear. I think that the composite should resize all of the children appropriately. This produces a 508 accessibility problem. For example , if you are using a table , and it is being partially covered up by the editor , and scroll down through it via keyboard. The focus leaves the viewable area.
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet296.java
public static void main (String[] args) {
	final Display display = new Display ();
	Shell shell = new Shell (display);
	shell.setBounds (10, 10, 300, 300);
	final ScrolledComposite sc = new ScrolledComposite (shell, SWT.VERTICAL);
	sc.setBounds (10, 10, 280, 200);
	final int clientWidth = sc.getClientArea ().width;
	final Tree tree = new Tree (sc, SWT.NONE);
	for (int i = 0; i < 99; i++) {
		TreeItem item = new TreeItem (tree, SWT.NONE);
		item.setText ("item " + i);
		new TreeItem (item, SWT.NONE).setText ("child");
	}
	sc.setContent (tree);
	int prefHeight = tree.computeSize (SWT.DEFAULT, SWT.DEFAULT).y;
	tree.setSize (clientWidth, prefHeight);
	/*
	 * The following listener ensures that the Tree is always large
	 * enough to not need to show its own vertical scrollbar.
	 */
	tree.addTreeListener (new TreeListener () {
		public void treeExpanded (TreeEvent e) {
			int prefHeight = tree.computeSize (SWT.DEFAULT, SWT.DEFAULT).y;
			tree.setSize (clientWidth, prefHeight);