Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » [SWT] Strange problem with layouts and CTabFolder
[SWT] Strange problem with layouts and CTabFolder [message #236868] Sat, 06 October 2007 17:55
Eclipse UserFriend
Originally posted by:

I am new in SWT and I have a strange problem which I can not solve myself.
I'm working with CTabFolder:
final Shell shell = new Shell(display);
shell.setSize(640, 480);
FillLayout layout = new FillLayout();
layout.type = SWT.VERTICAL;
layout.marginHeight = 10;
CTabFolder folder = new CTabFolder(shell, SWT.BORDER);
final CTabItem tab = new CTabItem(folder, SWT.CLOSE);
tab.setText("New questions wizard");

Group desk = new Group(folder, SWT.NONE);

GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;

GridData gridData = new GridData();

new Label(desk, SWT.NULL).setText("Project name: ");
final Text name = new Text(desk, SWT.BORDER | SWT.SINGLE);
gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridData.horizontalSpan = 2;

Label info = new Label(desk, SWT.NULL);
info.setText("Project description:");
gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridData.horizontalSpan = 3;

Text text = new Text(desk, SWT.BORDER | SWT.MULTI);
gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.FILL;
gridData.horizontalSpan = 3;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
When I run application I see window (shell), tab (CTabFolder), desk
(Group) with '*test*' title but I don't see anything inside desk (labels
and texts). When I resize window everything appears and looks as I want!
What is wrong with this code that I have to resize window to see all

Best regards,
Previous Topic:unable to create simple EJB
Next Topic:MinGW libraries
Goto Forum:

Current Time: Mon May 28 08:14:31 GMT 2018

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

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

Back to the top