[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How do you use FormLayout on a Composite with a Vertical Scrollbar?

The scrollbars in a Composite need to be managed by the application.  FormLayout (or any other SWT layout) does not manage scrollbars.  See org.eclipse.swt.custom.ScrolledComposite.
 
See also this SWT snippet:
 
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

Is there a way to add items past the initial visible screen using FormLayout?  More specifically, I have a Composite with a verticle scroll bar which I'm adding controls to using FormData with the "top" attribute set to a FormAttachment to the previously displayed Control.  However,  the scrollbar is only scrolling to the last item that fits on the size of the screen initially displayed, and no other items seem to be put on the composite.  I tried setting the bounds of the Composite to something larger than its size, but that still didn't work.  Any suggestions?