[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Scrollable Composite for multipage editor

Veronika,

Thanks for the example. After a bit more work, I came to the same
conclusion. However, I found that I needed to assign a RowLayout to my
ScrolledComposite before the Composite child and all of its controls were
made visible.

Just for illustration purposes, here's the code fragment I used to get
ScolledComposite to work:

        tabFolder_ = new TabFolder(parent, SWT.NONE);
	pageBook_ = new PageBook(tabFolder_, SWT.NONE);
	
	tabFolder_.setLayout(new FillLayout());

	// Create a page....
	//

	TabItem propTab = new TabItem(tabFolder_, SWT.NULL);
	propTab.setText("Properties");
	ScrolledComposite scp = new ScrolledComposite(pageBook_, SWT.V_SCROLL);
	
	scp.setLayout(new RowLayout());
	Composite cp = new Composite(scp, SWT.NONE);
	scp.setContent(cp);
	
	GridLayout myLayout = new GridLayout();
	myLayout.numColumns = 2;
	cp.setLayout(myLayout);

        // Create controls as children of cp...