Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » ScrolledComposite problems
ScrolledComposite problems [message #120418] Sat, 11 March 2006 00:15 Go to next message
Eclipse UserFriend
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);
}
Re: ScrolledComposite problems [message #120469 is a reply to message #120418] Mon, 13 March 2006 14:15 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You don't set any layout on the ScrolledComposite. You set the layout on
the content. The ScrolledComposite controls the layout and the content
for you.

Go to this page:

http://www.eclipse.org/swt/snippets/

It has a section on how to work with ScrolledComposites.

--
Thanks,
Rich Kulp
Re: ScrolledComposite problems [message #612304 is a reply to message #120418] Mon, 13 March 2006 14:15 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You don't set any layout on the ScrolledComposite. You set the layout on
the content. The ScrolledComposite controls the layout and the content
for you.

Go to this page:

http://www.eclipse.org/swt/snippets/

It has a section on how to work with ScrolledComposites.

--
Thanks,
Rich Kulp
Previous Topic:Import from Netbeans?
Next Topic:properties of TableColumn
Goto Forum:
  


Current Time: Fri Apr 26 19:07:40 GMT 2024

Powered by FUDForum. Page generated in 0.03388 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top