ScrolledComposite problems [message #120418] |
Sat, 11 March 2006 00:15 |
Eclipse User |
|
|
|
Originally posted by: stepehn.gmail.com
I'm using VE and I can't seem to get ScrolledComposite widgets to work
correctly.
I'm using the SWT.H_SCROLL & SWT.V_SCROLL styles to add the scroll bars, but
I can't seem to get any widgets to display in it. It also seems that VE
doesn't allow control of the GridLayout properly in a ScrolledComposite
either.
I have a few questions:
- How do I get the GridLayout functionality to work properly in VE with a
ScrolledComposite?
- How do I get widgets to display?
- Why does the scroll bars disappear as soon as a widget is added to the
ScrolledComposite?
The code I'm using is generated by VE and is below:
private void createContact_scrolled_composite() {
GridData gridData8 = new GridData();
gridData8.verticalSpan = 1;
gridData8.grabExcessHorizontalSpace = true;
gridData8.horizontalAlignment = GridData.FILL;
gridData8.verticalAlignment = GridData.FILL;
gridData8.grabExcessVerticalSpace = true;
contact_scrolled_composite = new ScrolledComposite(contacts_composite,
SWT.H_SCROLL | SWT.V_SCROLL);
contact_scrolled_composite.setLayout(new GridLayout());
contact_scrolled_composite.setLayoutData(gridData8);
test_label = new Label(contact_scrolled_composite, SWT.NONE);
test_label.setText("Label");
contact_scrolled_composite.setContent(test_label);
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04402 seconds