|
|
Re: FormLayout [message #465570 is a reply to message #465564] |
Thu, 15 December 2005 14:10 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
Is this what you mean:
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new FormLayout());
Composite top = new Composite(shell, SWT.BORDER);
Composite middle = new Composite(shell, SWT.BORDER);
Composite bottom = new Composite(shell, SWT.BORDER);
FormData data = new FormData();
data.left = new FormAttachment(0, 5);
data.right = new FormAttachment(100, -5);
data.top = new FormAttachment(0, 5);
data.height = 200;
top.setLayoutData(data);
data = new FormData();
data.left = new FormAttachment(0, 5);
data.right = new FormAttachment(100, -5);
data.top = new FormAttachment(top, 5);
data.bottom = new FormAttachment(bottom, -5);
middle.setLayoutData(data);
data = new FormData();
data.left = new FormAttachment(0, 5);
data.right = new FormAttachment(100, -5);
data.bottom = new FormAttachment(100, -5);
data.height = 200;
bottom.setLayoutData(data);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
"Stephen" <swmk.stephen@gmail.com> wrote in message
news:4ad09448e9913f6983528fd4f44acf4d$1@www.eclipse.org...
> Hi,
>
> I'm facing some problem. I have three composite in a composite.
>
> The top and bottom composite are fixed sized in height.
> The middle one may vary in size.
> And the parent composite is resizable.
>
> The problem is ;
> when a parent composite is resized, the bottom composite comes to the area
> of top composite.
> I use "top composite" for the "top" form attachment of middle composite
> and don't know what to put as the "bottom" attachment of the "bottom
> composite".
>
> The idea is like a window with title bar and status bar.
>
> --
> Thanks
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03027 seconds