EJoe
EJoe

Reputation: 65

Scrolled composite content is not shown in multi page wizard

I'm using Eclipse Neon 4.6. When I open a multi-page wizard, and its second page contents is a scrolled composite, the page comes up blank no widgets at all. When I resize or maximize the editor, then the contents are displayed and the development environment I am using is Ubuntu Linux. Please help to resolve the issue.

Please find the below code snippet

scrollBar = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.RESIZE);

scrollBar.setLayout(new FillLayout());
scrollBar.setExpandHorizontal(true);

scrollBar.setExpandVertical(true);
scrollBar.setLayoutData(newGrig);

messageGroup = new Composite(scrollBar, SWT.MULTI | SWT.BORDER);
GridLayout moduleLayout = new GridLayout(1, false);

moduleLayout.verticalSpacing = 0;
messageGroup.setLayout(moduleLayout);

messageGroup.setBackground(container.getBackground());
messageGroup.setLayoutData(newGrig);

scrollBar.setContent(messageGroup);


/**
 * if size exceeds moduleGrid.size, enable scrollbar
 */
scrollBar.addControlListener(new ControlAdapter()
{
    @Override
    public void controlResized(ControlEvent e)
    {
    scrollBar.setMinSize(messageGroup.computeSize(SWT.DEFAULT,
        SWT.DEFAULT));
    }
});

Upvotes: 1

Views: 224

Answers (0)

Related Questions