Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with Tree/Composite height
Problem with Tree/Composite height [message #438439] Thu, 24 June 2004 11:37 Go to next message
Eclipse UserFriend
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 13:53 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
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-
Previous Topic:Mouse event when clicking on the composite border.
Next Topic:Eclipse pluggin for SWT
Goto Forum:
  


Current Time: Fri Apr 19 22:10:45 GMT 2024

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