Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » New User problem: resizing panels
New User problem: resizing panels [message #458523] Thu, 14 July 2005 14:09 Go to next message
Eclipse UserFriend
Originally posted by: epetrone.bellsouth.net

I'm still fairly new to creating SWT GUIs and am having a problem with my
panels that I'm sure is something trivial, but I've not been able to solve
it.

If I put all my widgets as direct children of the application shell, then
with I resize the window the widgets adjust as I expect them too (text
fields get wider, etc). However, if I create a layer of composites as
children of the shell (to create more complex layouts), and make the
widgets children of the various composites, I lose the resizing. The outer
shell will resize, but the content (composites and widgets both) seem to
maintain their original size.

I'm sure I've either added something to the code that is interfering with
the resizing or have forgotten to add some snippet of code that is required.
Any thoughts?

Thanks,
Elaine
Re: New User problem: resizing panels [message #458655 is a reply to message #458523] Mon, 18 July 2005 16:09 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Controls are either explicity positioned during resize by application code
(using Control.setBounds()) or by layouts (see the hierarchy Layout and
Composite.setLayout()). If neither of these mechanisms are used, then a
control will not move. There is an in depth article on SWT layouts
available on Eclipse.org.

"Elaine" <epetrone@bellsouth.net> wrote in message
news:db5rlv$d19$1@news.eclipse.org...
> I'm still fairly new to creating SWT GUIs and am having a problem with my
> panels that I'm sure is something trivial, but I've not been able to solve
> it.
>
> If I put all my widgets as direct children of the application shell, then
> with I resize the window the widgets adjust as I expect them too (text
> fields get wider, etc). However, if I create a layer of composites as
> children of the shell (to create more complex layouts), and make the
> widgets children of the various composites, I lose the resizing. The
outer
> shell will resize, but the content (composites and widgets both) seem to
> maintain their original size.
>
> I'm sure I've either added something to the code that is interfering with
> the resizing or have forgotten to add some snippet of code that is
required.
> Any thoughts?
>
> Thanks,
> Elaine
>
>
Re: New User problem: resizing panels [message #458659 is a reply to message #458523] Thu, 14 July 2005 17:55 Go to previous message
Arun is currently offline ArunFriend
Messages: 61
Registered: July 2009
Member
Hi

The resizing behavior will now depend on the Layout you have given to the
composites that host your widgets

Arun


"Elaine" <epetrone@bellsouth.net> wrote in message
news:db5rlv$d19$1@news.eclipse.org...
> I'm still fairly new to creating SWT GUIs and am having a problem with my
> panels that I'm sure is something trivial, but I've not been able to solve
> it.
>
> If I put all my widgets as direct children of the application shell, then
> with I resize the window the widgets adjust as I expect them too (text
> fields get wider, etc). However, if I create a layer of composites as
> children of the shell (to create more complex layouts), and make the
> widgets children of the various composites, I lose the resizing. The
outer
> shell will resize, but the content (composites and widgets both) seem to
> maintain their original size.
>
> I'm sure I've either added something to the code that is interfering with
> the resizing or have forgotten to add some snippet of code that is
required.
> Any thoughts?
>
> Thanks,
> Elaine
>
>
Previous Topic:Proper use of ColumnWeightData
Next Topic:ScolledComposite with Text wrap
Goto Forum:
  


Current Time: Thu Apr 25 00:31:33 GMT 2024

Powered by FUDForum. Page generated in 0.03075 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top