I would like to add scrolledComposite to wizard page in Eclipse plug-in. Everything works fine on the FirstPage where I implemented scrolledComposite. The problem is, the SecondPage which is to display after that, is blank.
Initialization code for FirstPage:
public void createControl(Composite parent) {
ScrolledComposite scroll = new ScrolledComposite(parent, SWT.NULL | SWT.V_SCROLL);
scroll.setLayoutData(new GridData(GridData.FILL_VERTICAL));
scroll.setAlwaysShowScrollBars(false);
scroll.setExpandVertical(true);
scroll.setExpandHorizontal(true);
scroll.setMinHeight(500);
scroll.setLayout(new GridLayout(1, false));
Composite container = new Composite(scroll, SWT.NULL);
GridLayout layout = new GridLayout();
container.setLayout(layout);
scroll.setContent(container);
setControl(container);
setPageComplete(false);
}
SecondPage createControl code is standard, but I also tried, to locate a parent, which would be a scroll - I supposed it would be issue of "nested" ScrolledComposite - like that:
ScrolledComposite scroll = null;
if(parent.getChildren() != null && parent.getChildren().length > 1 && parent.getChildren()[1] instanceof ScrolledComposite) {
scroll = (ScrolledComposite)parent.getChildren()[1];
}
scroll.setLayoutData(new GridData(GridData.FILL_VERTICAL));
Composite container = new Composite(scroll, SWT.NULL);
scroll.setContent(container);
scroll.setAlwaysShowScrollBars(false);
scroll.setExpandVertical(true);
scroll.setExpandHorizontal(true);
scroll.setMinHeight(500);
scroll.setLayout(new GridLayout(1, false));
GridLayout layout = new GridLayout();
container.setLayout(layout);
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
but such approach doesn't work.
Has anyone some experience with integrating with ScrolledComposites and multi-page JFace wizards?