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.
Asked
Active
Viewed 374 times
2
-
I'd love to see this question addressed to Swing and AWT controls as well. Layouts are hard, and I've never found that one pattern that just works. – Bill K Mar 12 '09 at 19:47
1 Answers
0
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.

Community
- 1
- 1

Aaron Novstrup
- 20,967
- 7
- 70
- 108