Bug 83564

Summary: [SashForm] Sash no longer moveable when one weight is very tiny
Product: [Eclipse Project] Platform Reporter: Benjamin Pasero <bpasero>
Component: SWTAssignee: Veronika Irvine <veronika_irvine>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: ui
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Benjamin Pasero CLA 2005-01-24 17:13:12 EST
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);
    form.setLayout(new FillLayout());

    Composite child1 = new Composite(form, SWT.NONE);
    child1.setLayout(new FillLayout());
    new Label(child1, SWT.BORDER).setText("Label in pane 1");

    SashForm form2 = new SashForm(form, SWT.VERTICAL);
    form2.setLayout(new FillLayout());

    Composite child2 = new Composite(form2, SWT.NONE);
    child2.setLayout(new FillLayout());
    new Label(child2, SWT.BORDER).setText("Label in pane2");

    Composite child3 = new Composite(form2, SWT.NONE);
    child3.setLayout(new FillLayout());
    new Label(child3, SWT.BORDER).setText("Label in pane3");

    form.setWeights(new int[] { 30, 70 });
    form2.setWeights(new int[] { 1, 99 });
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
        display.sleep();
    }
    display.dispose();
  }
}

Using SWT 3166 its not possible to drag the top-right Sash that seperates Label
in Pane 2 from Label in Pane 3.

Ben
Comment 1 Benjamin Pasero CLA 2005-04-25 14:41:16 EDT
Ops, I think I was talking of SWT 3.0.66 and not 3.1.66.
However, still reproducable with SWT 3.1.31.

Ben
Comment 2 Veronika Irvine CLA 2005-05-04 13:43:40 EDT
Fixed for 3.1 M7.