Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CTabItem Content Not showing up
CTabItem Content Not showing up [message #527551] Thu, 15 April 2010 15:03 Go to next message
Andrew Hubbs is currently offline Andrew HubbsFriend
Messages: 9
Registered: April 2010
Location: Dallas TX
Junior Member


I am unable to get my CTabItem content to show up. I am creating the CTabFolder, adding a CTabItem to it, creating a Composite on the CTabFolder. Setting tab item control to that composite.
	public void createPartControl(Composite parent) {
//Create Form and Toolkit
		managedForm = new ManagedForm(parent);
		form = managedForm.getForm();
		toolkit = managedForm.getToolkit();
		form.setText("Function Edit Form - ");
		//Set layout
		ColumnLayout formLayout = new ColumnLayout();
		//Add the tabFolder
		tabFolder = new CTabFolder(form.getBody(), SWT.FLAT | SWT.BOTTOM);
		toolkit.adapt(tabFolder, true, true);
		ColumnLayoutData clData = new ColumnLayoutData(ColumnLayoutData.FILL);
		clData.heightHint = 0;
		tabFolder.setLayout(new ColumnLayout());
		Color selectedColor = toolkit.getColors().getColor(FormColors.SEPARATOR);
		tabFolder.setSelectionBackground(new Color[] {selectedColor, toolkit.getColors().getBackground()}, new int[] {100});
		//Create the Function Tab and contents
		final CTabItem item = new CTabItem(tabFolder, SWT.NULL);
		functionTabContent = toolkit.createComposite(tabFolder);//form.getBody());
		clData = new ColumnLayoutData(ColumnLayoutData.FILL);
		functionTabContent.setLayout(new ColumnLayout());

... Adding things to the Composite functionTabContent...

form.getForm().layout(true, true);

I am completely stumped as to why this is not working. Any suggestions are appreicated.




Andrew Hubbs
Re: CTabItem Content Not showing up [message #527636 is a reply to message #527551] Thu, 15 April 2010 20:21 Go to previous message
Andrew Hubbs is currently offline Andrew HubbsFriend
Messages: 9
Registered: April 2010
Location: Dallas TX
Junior Member

Solved my own problem.

Problem lines:
		tabFolder.setLayout(new ColumnLayout());

You are not supposed to assign Layout information to the folder. This fact is written in the API.



Andrew Hubbs
Previous Topic:StyledText in SWT Table
Next Topic:How to position the caret from mouse cursor in SWT Text
Goto Forum:

Current Time: Sun Jan 19 18:12:23 GMT 2020

Powered by FUDForum. Page generated in 0.01759 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top