A very basic question. How can one have a Dialog with a scrollbar?
I have a class extending TitleAreaDialog. This dialog will contain a lot
of widgets (checkboxes) that make it necessary to have a vertical
scrollbar. I have tried:
In the constructor of the dialog:
setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX |
SWT.APPLICATION_MODAL | SWT.H_SCROLL | SWT.V_SCROLL);
In createDialogArea(Composite parent):
ScrolledForm scrolledForm = new ScrolledForm(parent, SWT.H_SCROLL |
SWT.V_SCROLL);
scrolledForm.setExpandVertical(true);
scrolledForm.setExpandHorizontal(true);
scrolledForm.setMinSize(0, 0);
// also tried
scrolledForm.setMinSize(parent.getSize());
Nothing works, no scroll bars are seen even though there are more widgets
than are visible.
Any pointers (especially code snippets) are highly appreciated.