layout.marginLeft = 10;
layout.marginRight = 10;
form.getBody().setLayout(layout);
// Scrolled text
ScrolledFormText scrolledFormText = new ScrolledFormText(form.getBody(), true);
FormText text = toolkit.createFormText(scrolledFormText, true);
scrolledFormText.setAlwaysShowScrollBars(false);
StringBuilder builder = new StringBuilder();
for (final String currentText : texts) {
builder.append("<p>").append(currentText).append("</p>");
}
text.setText(String.format("<form>%s</form>", builder.toString()), true, false);
FormData data = new FormData();
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100);
data.width = 150;
data.height = 100;
scrolledFormText.setLayoutData(data);
scrolledFormText.setFormText(text);
scrolledFormText.setBackground(ColorConstants.white);
return parent;
}