我想将垂直滚动条添加到以下代码中显示的屏幕上。你能建议怎么做吗?
public class SampleDialog extends TrayDialog {
public SampleDialog(final Shell shell) {
super(shell);
this.shell = shell;
}
@Override
public void create() {
super.create();
}
@Override
protected Control SampleDialog(final Composite parent) {
final GridLayout layout = new GridLayout();
layout.numColumns = 1;
parent.setLayout(layout);
createSampleText(parent);
createSampleCombo(parent);
}
}
where:
org.eclipse.jface.dialogs.TrayDialog;
org.eclipse.swt.layout.GridLayout;
org.eclipse.swt.widgets.Composite;