1

コンポジットとグループ内にテキストを入れたいのですが、何らかの理由でテキストが UI に表示されません。誰か私に何か提案をしてもらえますか? ありがとう!

    data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    data.horizontalSpan = 2;
    Group group1 = new Group(shell, SWT.SHADOW_IN);
    group1.setText("This is my group");
    group1.setLayoutData(data);
    Text text = new Text(group1, SWT.NONE);
    text.setText("Group test with label");
4

1 に答える 1

1
group1.setLayout(new RowLayout(SWT.VERTICAL));

これで問題を解決できます。

于 2012-06-13T22:43:05.037 に答える