Shell size

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

Shell size

Postby domfe » Tue Oct 26, 2010 4:28 am

Hi.
I'm playing with XWT and the size of Shell widget. Why the size setting in the editor isn't
reflected at runtime?

Thank you.
domfe
 
Posts: 46
Joined: Mon Oct 04, 2010 6:42 am

Re: Shell size

Postby Eric Clayberg » Wed Oct 27, 2010 7:07 am

In the corresponding Java file, comment out the call to centerInDisplay().

The XWT engine will then automatically pack the shell to the minimum size needed to contain all of the widgets.
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

Re: Shell size

Postby domfe » Wed Oct 27, 2010 7:30 am

Ok for centerInDisplay.
But I don't want the minimum size, but the size I see in the Designer when I drag the border
of my Shell component.

Thanks.
domfe
 
Posts: 46
Joined: Mon Oct 04, 2010 6:42 am

Re: Shell size

Postby Eric Clayberg » Wed Oct 27, 2010 7:35 am

It does not appear that XWT itself supports this (at least it appears to ignore any width/height settings and just packs everything.

The work around would be to set the size in Java code in the corresponding Java file (using a call to setSize() or setBounds()).
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: Bing [Bot], Google [Bot] and 1 guest

cron