Community
Participate
Working Groups
Sashform can't be dinamically resized.The same code work if I use only swt (not jface) -------------------------------------------------- package com.swtjface.Ch3; import org.eclipse.swt.*; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.widgets.*; //No funciona en windows xp public class Ch3_SashForm extends Composite { public Ch3_SashForm(Composite parent) { super(parent, SWT.NONE); SashForm sf = new SashForm(this, SWT.VERTICAL); sf.setSize(120, 100); Button button1 = new Button(sf, SWT.ARROW | SWT.UP); button1.setSize(120, 40); Button button2 = new Button(sf, SWT.ARROW | SWT.DOWN); button2.setBounds(0, 45, 120, 40); } } package com.swtjface.Ch3; import org.eclipse.jface.window.*; import org.eclipse.swt.widgets.*; public class CompViewer extends ApplicationWindow { public CompViewer() { super(null); } protected Control createContents(Composite parent) { new Ch3_SashForm(parent); return parent; } public static void main(String[] args) { CompViewer cv = new CompViewer(); cv.setBlockOnOpen(true); cv.open(); Display.getCurrent().dispose(); } }
Bug in JFace ?
In your example you are returning a Composite (Ch3_SashForm) with no layout. That'll pretty well kill resizing below that point. Add a line after super(parent, SWT.NONE); setLayout(new FillLayout()); PW