| [news.eclipse.platform.swt] Re: GridLayout fill problem |
Hi,
I couldn't think of a good title for this entry, so here's the longer and clearer version:
I need to split a composite into two columns (e.g. with GridLayout or TableWrapLayout)and add components to each of them - something like the Plugin Manifest Editor in PDE. The idea is to fill the whole editor with this composite, so that each column is exactly half the size of the editor space (i.e. the layout will be re-calculated when the window is enlarged).
So far it goes like this:
composite.setLayout(new GridLayout(2,true));
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(composite);
Hope this helps, Eric
The problem is that after adding some wider controls to this composite (wider than half the editor width), the column layout is then re-calculated and respectively the column width is increased. I need to prevent the latter from happening - i.e. I need to have a composite that is both dynamic and will acquire its parent size, and 'static enough' to preserve this size when its children try to enlarge it.
Is this somehow possible?
Thanx and cheers, Alex