BorderLayout ignoring composite sizes

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

BorderLayout ignoring composite sizes

Postby mdeegler » Tue Apr 05, 2005 12:58 pm

How do i specify the size of a component in the north, south, west, or east regions?

If i remember correctly, the Swing version would simply take the width or height of the panel and use it where appropriate. For example if i placed a panel in the southern region, the BorderLayout would ignore the width but use the height of the panel

This does not seem to be the case for swing2swt.layout.BorderLayout. It seems to be computing the sizes based off the components that make up the composite in the outer region.

any suggestions?

-matt
mdeegler
 
Posts: 1
Joined: Tue Apr 05, 2005 12:48 pm

Re: BorderLayout ignoring composite sizes

Postby Eric Clayberg » Fri Apr 08, 2005 6:28 am

mdeegler wrote:This does not seem to be the case for swing2swt.layout.BorderLayout. It seems to be computing the sizes based off the components that make up the composite in the outer region.

I haven't look at the code for swing2swt.layout.BorderLayout in any great detail (we didn't write it), but it does appear to dynamically compute the size of each cell based on its contents. I don't know that there is any way around that.

BTW, if you want better control over the size of each cell, you might just want to use the standard SWT GridLayout instead. A three column grid could be used to emulate a BorderLayout very effectively.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest