Eclipse RCP でユーザー インターフェイスを修正できないため、私はすでに絶望的です。だから、あなたが私を助けてくれることを願っています。これが画面で、何が私を悩ませているかは明らかだと思います: http://imgur.com/QOf0O
ラベルとテキストのないコードを次に示します (最初のラベルとテキストをポストします。残りは同じです。setSize() は、セクションごとに最初のラベルでのみ実行されます)。
Composite c = this.toolkit.createComposite(parent);
c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
ColumnLayout columnLayout = new ColumnLayout();
columnLayout.minNumColumns = 2;
columnLayout.maxNumColumns = 2;
c.setLayout(columnLayout);
Section leftUpSection = this.toolkit.createSection(c,
Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE
| Section.EXPANDED);
leftUpSection.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
KundeEditor.this.form.reflow(true);
}
});
leftUpSection.setText("Daten");
leftUpSection
.setLayoutData(new ColumnLayoutData(ColumnLayoutData.FILL));
Composite leftUp = this.toolkit.createComposite(leftUpSection);
leftUp.setLayout(new GridLayout(2, false));
lblNachname.setSize(230, lblNachname.getSize().y);
this.txtNachname = this.toolkit.createText(leftUp,
this.kunde.getNachname(), SWT.LEFT | SWT.BORDER);
this.txtNachname.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
this.txtNachname.addModifyListener(listener);
Section leftDownSection = this.toolkit.createSection(c,
Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE
| Section.EXPANDED);
leftDownSection.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
KundeEditor.this.form.reflow(true);
}
});
leftDownSection.setText("Kontoinformation");
leftDownSection.setLayoutData(new ColumnLayoutData(
ColumnLayoutData.FILL));
Composite leftDown = this.toolkit.createComposite(leftDownSection);
leftDown.setLayout(new GridLayout(2, false));
Section rightSection = this.toolkit.createSection(c,
Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE
| Section.EXPANDED);
rightSection.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
KundeEditor.this.form.reflow(true);
}
});
rightSection.setText("Kontaktinformation");
rightSection.setLayoutData(new ColumnLayoutData(ColumnLayoutData.FILL));
Composite right = this.toolkit.createComposite(rightSection);
right.setLayout(new GridLayout(2, false));
Section rightDownSection = this.toolkit.createSection(c,
Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE
| Section.EXPANDED);
rightDownSection.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
KundeEditor.this.form.reflow(true);
}
});
rightDownSection.setText("Mitgliedsinformation");
rightDownSection.setLayoutData(new ColumnLayoutData(
ColumnLayoutData.FILL));
Composite rightDown = this.toolkit.createComposite(rightDownSection);
rightDown.setLayout(new GridLayout(2, false));
前もって感謝します!