0

我在 Tabfolder 属性中有一个组-放置了一组控件...现在我需要放置控件的特定 TabItem 的滚动条...

尝试使用 scrollableComposite 但它没有用......我需要如何进步......

protected void setControls(Composite parent)
{


    ScrolledComposite s1 = new ScrolledComposite(parent,SWT.V_SCROLL  |SWT.H_SCROLL);
    s1.setExpandHorizontal(true);
        s1.setExpandVertical(true);     


    OptionGroup = new Group(s1, SWT.None);
    OptionGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
    OptionGroup.setLayout(new GridLayout());

    final GridLayout gl_fileOptionGroup1 = new GridLayout();
    gl_fileOptionGroup1.numColumns = 2;
    OptionGroup.setLayout(gl_fileOptionGroup1);
                                          ::::
4

1 回答 1

0

尝试

s1.setSize(s1.computeSize(SWT.DEFAULT, SWT.DEFAULT)); 
于 2013-11-14T12:55:47.423 回答