Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ScrolledComposite with Expandablecomposite
ScrolledComposite with Expandablecomposite [message #493611] Tue, 27 October 2009 09:05 Go to next message
David CHAUTARD is currently offline David CHAUTARDFriend
Messages: 102
Registered: July 2009
Senior Member
Hello,
I use a ScrolledComposite which contents a ExpandableComposite, which is closed when I open my editor.I would like that when I expand my composite (which is longer than the ScrolledComposite), a scrollbar appears in the ScrolledComposite.
I use a listener but nothing happens.

mySection.addExpansionListener(new ExpansionAdapter() {
	public void expansionStateChanged(ExpansionEvent e) {
		form.reflow(true);
		parent.layout();
	}
});


Someone would have an idea?
Thx.
Re: ScrolledComposite with Expandablecomposite [message #496256 is a reply to message #493611] Mon, 09 November 2009 14:11 Go to previous message
David CHAUTARD is currently offline David CHAUTARDFriend
Messages: 102
Registered: July 2009
Senior Member
I find a solution to my problem.
I just use scrollComposite.setExpandHorizontal(true) on my scrollComposite. And in my method expansionStateChanged of my ScrollComposite's listener, I don't use the reflow method, but :

myComposite.setSize(myComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
myComposite.layout();


where myComposite is the composite contained by the scrolledComposite, and which contains the expendable composite.

I hope that will help someone.
David.
Previous Topic:Disable Tab Item
Next Topic:How can I detect scrolling triggered by TreeNavigator ?
Goto Forum:
  


Current Time: Sun Jul 05 21:26:57 GMT 2020

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

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

Back to the top