tags:

views:

115

answers:

1

What's the best way to cause a component hierarchy to relayout when a SWT control's preferred size changes? My particular situation is a dynamic update of a Label's text.

A: 

The only approach I know of, suggested by bokowski as an answer to a previous question, is to walk up the component hierarchy to a Composite ancestor with scrollbars, then call ancestor.layout(new Control[] { changedDescendent }). Is there a better way to do this? Preferably with a simple method call on the changed control or its parent.

Aaron Novstrup