|Re: Layout problem [message #491455 is a reply to message #491352]
||Wed, 14 October 2009 16:10
| Grant Gayed
Registered: July 2009
Calling layout() on a Composite does not resize the Composite, it just lays
out its children again. To resize the Composite you should call layout() on
its parent if the parent is using a layout, or pack() the Composite
"C" <email@example.com> wrote in message
> I have a problem with layout of composites in my application. I am
developping an RCP application in which I have a multipage editor. One of
the page contains several sections (one above each other).
> In one of these sections, I have a composite and two buttons and a grid
layout. The composite is two column width, so my buttons are under the
> This composite can contain mutliple children and these children can be
added/removed by the user at runtime. I use a grid layout in my composite.
> The problem is that I can't find a way to automatically resize my section
(which contains the composite) when a new child is added/removed in the
> I tried to call layout on the composite (the container), and on the
section, but the section doesn't resize properly: it keeps the same size. It
means that when I add a new child in the container, the child is not visible
and the only way to make it visible is to close/reopen the section (in which
case, the layout is correct).
> What could be the problem ?
Powered by FUDForum
. Page generated in 0.01824 seconds