I have this selection dialog in eclipse that I implement, when I resize this dialog after a certain limit the vertical scrollbar diappears, I want to implement it similarly to how eclipse implements its "open type" dialog when you press ctrl+shift+T. However when I saw the code for the "open type" dialog, there was no cue from it that I could take for how they implement their scrollbar feature. Kindly help if anybody has any idea regarding this.
My code for the dialog area is
@Override
protected Control createDialogArea(Composite parent) {
initializeDialogUnits(parent);
Composite comp = (Composite) super.createDialogArea(parent);
String label = getMessage();
if (label != null && label.trim().length() != 0) {
Label labelComp = new Label(comp, SWT.BEGINNING);
labelComp.setText(label);
}
label = getViewerLabel();
if (label != null && label.trim().length() != 0) {
Label viewerLabel = new Label(comp, SWT.BEGINNING);
viewerLabel.setText(label);
}
createMessageArea(comp);
StructuredViewer fViewer;
fViewer = createViewer(comp);
fViewer.setLabelProvider(getLabelProvider());
fViewer.setContentProvider(getContentProvider());
fViewer.setInput(getViewerInput());
List<?> selectedElements = getInitialElementSelections();
if (selectedElements != null && !selectedElements.isEmpty()) {
fViewer.setSelection(new StructuredSelection(selectedElements));
}
addViewerListeners(fViewer);
addCustomFooterControls(comp);
Dialog.applyDialogFont(comp);
String help = getHelpContextId();
if (help != null) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, help);
}
return comp;
}
thanks and regards