Problem with Tree/Composite height [message #438439] |
Thu, 24 June 2004 07:37  |
Eclipse User |
|
|
|
Originally posted by: yuraukar.hotmail.com
I have written a very basic layout class,
that is supposed to align all its children
from top to bottom, strechted to the
container's width.
The class basically calls
computeSize(width,SWT.DEFAULT,flushCache)
on all children and aligns them accordinly.
Problem is now, that one child should be
a composite with fillLayout and a tree control
in it. This composite should appear with a
height of 300.
Inspection shows that composite delegates
computeSize to its layout->FillLayout which
calls computeSize on the Tree and this
always returns 2xitem height.
Is there a way to force a composite with flow
layout to return a certain height?
Or is this the wrong approach?
Thanks. Yuraukar-
|
|
|
Re: Problem with Tree/Composite height [message #438450 is a reply to message #438439] |
Thu, 24 June 2004 09:53  |
Eclipse User |
|
|
|
See the width and height hint fields of layout data.
"Yuraukar" <yuraukar@hotmail.com> wrote in message
news:cbeecv$c8b$1@eclipse.org...
> I have written a very basic layout class,
> that is supposed to align all its children
> from top to bottom, strechted to the
> container's width.
> The class basically calls
> computeSize(width,SWT.DEFAULT,flushCache)
> on all children and aligns them accordinly.
>
> Problem is now, that one child should be
> a composite with fillLayout and a tree control
> in it. This composite should appear with a
> height of 300.
> Inspection shows that composite delegates
> computeSize to its layout->FillLayout which
> calls computeSize on the Tree and this
> always returns 2xitem height.
>
> Is there a way to force a composite with flow
> layout to return a certain height?
> Or is this the wrong approach?
>
> Thanks. Yuraukar-
|
|
|
Powered by
FUDForum. Page generated in 0.03436 seconds