Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[albireo-dev] SWT size/layout management

Hi Gordon (or anyone else who knows it),

When the SwingControl's size changes, we do

      getParent().layout();

Why not    getParent().getParent().layout();     ?

Why not    getParent().getParent().getParent().layout();     ?

It looks quite arbitrary to me. I traced through the call
      getParent().layout();
and it really does not access or notify the parent's parent.

In contrast, Swing's relayout mechanism climbs up to the next "validation root",
i.e. the next component in the ancestors list which is known to isolate size
changes in its children from its parent (i.e. which is known to have constant
size, regardless of its children).

What is the usual way in SWT to achieve a proper resizing?

I see that Composite has methods changed(Control[]) and layout(Control[]).
How are these methods used correctly?

Bruno


Back to the top