[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Composite Sizes

<noob>
Hi.
I've created a Composite which contains a TableViewer and a Lable (status text etc.) but i have the problem that whenever i set a GridLayout the TableViewer gets very small and i have to resize
every value manually.
So i tried FillLayout, which sets the acorrect size to the TableViewer but the label is large as the TableViewer.


I tried to put each into it's own composite but still the label is too large, even when i try to set the soizes manually.

Could please someone look quickly through the code and help me ?

"
public void createPartControl(Composite parent)
{
	// set display
	display_= parent.getDisplay();

	// create new table viewer
	Composite viewer = new Composite(parent, SWT.NONE);
	FillLayout fill = new FillLayout (SWT.VERTICAL);
	viewer.setLayout(fill);
	viewer.setVisible(true);
	viewer_ = new TableViewer(viewer, SWT.TOP | SWT.SINGLE | SWT.V_SCROLL);

	// SOME VIEWER_ STUFF HERE				
		
	Composite test = new Composite (parent, SWT.NONE);
	label_ = new Label(test, SWT.HORIZONTAL);
	label_.setText("test");

    	//label_.setFont(font_registry_.get("list"));
    	label_.pack();
	test.pack();
	test.setVisible(true);
	label_.setVisible(true);
		
		
	FillLayout grid = new FillLayout (SWT.VERTICAL);
	parent.setLayout(grid);
		
	}
"

Kind Regards
Helmut

</noob>