1

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));
    }
});
greg-449
  • 109,219
  • 232
  • 102
  • 145
EJoe
  • 55
  • 8

0 Answers0