ScrolledComposite scrollFormItemComposite = new ScrolledComposite(c, SWT.V_SCROLL | SWT.BORDER);
GridData formItemCompositeGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
formItemCompositeGridData.horizontalSpan = 4;
scrollFormItemComposite.setLayoutData(formItemCompositeGridData);
GridLayout formItemLayout = new GridLayout(1, true);
formItemLayout.marginHeight = 0;
formItemLayout.marginWidth = 0;
formItemLayout.verticalSpacing = 0;
formItemLayout.horizontalSpacing = 0;
scrollFormItemComposite.setLayout(formItemLayout);
Composite formItemComposite = new Composite(scrollFormItemComposite, SWT.RESIZE);
formItemComposite.setLayout(new FillLayout(SWT.VERTICAL|SWT.HORIZONTAL));
FormProvider formProvider = new FormProvider();
formProvider.createForms(formItemComposite);
scrollFormItemComposite.setContent(formItemComposite);
scrollFormItemComposite.setExpandHorizontal(true);
scrollFormItemComposite.setExpandVertical(true);
scrollFormItemComposite.setMinSize(formItemComposite.computeSize(300,SWT.DEFAULT));
前面的代码行给出了以下输出。我希望内容随着表单变小而缩小。我不希望出现水平滚动条。如何防止文本框被隐藏?