Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ScrollableComposite
ScrollableComposite [message #664945] Tue, 12 April 2011 14:53 Go to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
I have a problem with this class.

The vertical scroll is not visible.

final ScrolledComposite scrolled = new ScrolledComposite(composite, SWT.V_SCROLL | SWT.BORDER);

final Composite compositeCond = new Composite(scrolled, SWT.NONE);
			
scrolled.setExpandHorizontal(true);
scrolled.setExpandVertical(true);
scrolled.setMinHeight(50);
scrolled.setContent(compositeCond);
			
compositeCond.setLayout(new GridLayout());


compositeCond has multiple widgets but the vertical scroll bar is not visible.
Re: ScrollableComposite [message #665145 is a reply to message #664945] Wed, 13 April 2011 12:57 Go to previous messageGo to next message
Lakshmi ShanmugamFriend
Messages: 276
Registered: July 2009
Location: India
Senior Member
Hi,

You should try with scrolled.setExpandVertical(false); or
set the mininum height to a value greater the ScrolledComposite height.
Please see the javadoc of ScrolledComposite.setExpandVertical() for the explanation.
Also see example snippet --> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.j ava


Lakshmi P Shanmugam
Re: ScrollableComposite [message #665148 is a reply to message #664945] Wed, 13 April 2011 12:58 Go to previous message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
Thanks!!!
Previous Topic:SWT large component widget question
Next Topic:Shell set bounds on multiple monitor reset to the screen center
Goto Forum:
  


Current Time: Tue Feb 18 00:01:30 GMT 2020

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

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

Back to the top