Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Can't layout appropriately using FormLayout
Can't layout appropriately using FormLayout [message #460299] Tue, 23 August 2005 20:19
Eclipse UserFriend
Originally posted by: murley.murley.murley

I am using FormLayout in my application. Now i have several problems that
i meet:

1) after i layout all components using formlayout, i cannot retrieve exactly
the size of each components. (My idea is create a Table, because of this, i
can't call table.setSize() to fit the apps.)
2) the 'bottom' cannot shown in my apps.

Below is the source code for my components, could anyone can give me a hand
for help, i am really frustrated in it. thanks...

//////////////////////////////////////////////////////////// ///////////
// TODO: a toolbar
Button toolBar = new Button(shell, SWT.PUSH | SWT.LEFT);
toolBar.setText("TODO: ToolBar");
FormData tbData = new FormData();
tbData.left = new FormAttachment(0);
tbData.right = new FormAttachment(100); = new FormAttachment(0);
tbData.bottom = new FormAttachment(5);
//////////////////////////////////////////////////////////// ///////////////
Button heading = new Button(shell, SWT.PUSH | SWT.LEFT);
FormData headingData = new FormData(); = new FormAttachment(toolBar, 0);
headingData.left = new FormAttachment(toolBar, 0, SWT.LEFT);
headingData.right = new FormAttachment(100);
// headingData = new FormAttachment(7);
//////////////////////////////////////////////////////////// /////////////////
Button sashForm = new Button(shell, SWT.PUSH | SWT.LEFT);
sashForm.setText("this part i will create a table");
FormData sashData = new FormData();
sashData.left = new FormAttachment(heading, 0, SWT.LEFT);
sashData.right = new FormAttachment(100); = new FormAttachment(heading, 0);
sashData.bottom = new FormAttachment(97);
Button bottom = new Button(shell, SWT.PUSH | SWT.LEFT);
FormData bottomData = new FormData();
bottomData.left = new FormAttachment(sashForm, 0, SWT.LEFT);
bottomData.right = new FormAttachment(100); = new FormAttachment(sashForm);
bottomData.bottom = new FormAttachment(2);

Thanks for help
Best regards,
Previous Topic:Firefox browser on Linux
Next Topic:Prevent Editor from being closed
Goto Forum:

Current Time: Wed Apr 21 22:02:06 GMT 2021

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

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

Back to the top