I am creating a widget, which will display a text followed by a progress bar. For this I create a Composite
container = new Composite(parent, SWT.BORDER);
container.setLayoutData(layoutData);
container.setLayout(new GridLayout(1, true));
To this I add a Label
messageText = new Label(container, SWT.WRAP | SWT.BORDER | SWT.CENTER);
messageText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
followed by a composite holding the progress bar:
final Composite progressContainer = new Composite(container, SWT.BORDER);
progressContainer
.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
What I would expect is the label to grow as to be able to contain the full text. I have been trying to follow the instructions from this post however, I must be missing something as I am not able to achieve the desired behavior.
Thanks for the input.