I injected a TableEditor inside a SWT Table, with ragged-left alignment (SWT.RIGHT).
final TableEditor editor = new TableEditor(table);
editor.horizontalAlignment = SWT.RIGHT;
editor.setEditor(toDisplay, item, 1);
toDisplay is a 2x1 GridLayout composite with two children:
- a dynamic Label
- a button
My issue is: when the dynamic label updates (gets wider), the toDisplay wrapper composite shifts outside of the table column instead of realigning as a good ragged-left boy [a screenshot of this behaviour is attached].
Layout data for both children is set via:
The button has a SelectionListeners which updates the text, then lays-out the parent composite.
It seems all combinations of .pack() and .layout() do not affect the editor.
Any idea of what might help?
Thanks for the help,
[Updated on: Fri, 18 September 2015 06:59]
Report message to a moderator