[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] [forms] adding composites + scrolling
|
- From: Kai Schlamp <schlamp@xxxxxxxxxxxx>
- Date: Fri, 22 Feb 2008 17:36:59 +0100
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.6 (X11/20071022)
When I add a composite (layout->ColumnLayout) to a ScrolledForm, like in
the simple example below, then the horizontal scrollbar doesn't show up
at all and the vertical one not correctly, when resizing the the view
smaller than the content is.
Why that? Should I use another layout manager for the body of the form?
(Tried some, but nothing worked.)
@Override
public void createPartControl(Composite parent) {
toolkit = new FormToolkit(parent.getDisplay());
scrolledForm = toolkit.createScrolledForm(parent);
scrolledForm.setText("Document Detail");
FillLayout fillLayout = new FillLayout();
fillLayout.type = SWT.VERTICAL;
scrolledForm.getBody().setLayout(fillLayout);
Composite comp = toolkit.createComposite(scrolledForm.getBody());
ColumnLayout layout = new ColumnLayout();
layout.maxNumColumns = 2;
layout.minNumColumns = 1;
comp.setLayout(layout);
toolkit.createLabel(comp, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
toolkit.createLabel(comp, "bbbbbbbbbbbbbbbbbbbbbbbbbbb");
scrolledForm.pack();
}