Project: SWT
Bug 79481 Sash no longer draggable when too small
Reported: 2004-11-25 06:19:11 | Status: resolved fixed

Hi, see this snippet: public class Main { public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.SMOOTH); form.setLayout(new FillLayout()); Composite child1 = new Composite(form, SWT.NONE); child1.setLayout(new FillLayout()); new Label(child1, SWT.NONE).setText("Label in pane 1"); Composite child2 = new Composite(form, SWT.NONE); child2.setLayout(new FillLayout()); new Button(child2, SWT.PUSH).setText("Button in pane2"); Composite child3 = new Composite(form, SWT.NONE); child3.setLayout(new FillLayout()); new Label(child3, SWT.PUSH).setText("Label in pane3"); form.setWeights(new int[] { 30, 40, 30 }); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } Grab the second Sash (right to the button), move it as far as possible to the left (the button becomes very thin). Try to grab the same Sash again. Notice that its not possible. Note: Bug does not occur when not using SWT.SMOOTH Suggestion: Its possible to size the button thiner, as without SWT.SMOOTH. I guess when using SWT.SMOOTh the button becomes that thin, that the Sash itself becomes invisible. The SashForm should not allow to resize the Sash to a smaller value than possible when not using SWT.SMOOTH. Ben

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java