Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] render view inside a scrollable composite
[EMF Forms] render view inside a scrollable composite [message #1710197] Mon, 05 October 2015 09:41 Go to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
Hi

I try to render EMF Forms view so that it can be scrolled vertically:
Composite scrollable = new Composite(mainArea, SWT.V_SCROLL);
scrollable.setLayout(new GridLayout(1, false)); // had also FillLayout here
ECPSWTViewRenderer.INSTANCE.render(scrollable, vmc);

The scroll-bar is there but the view does not scroll - it is somehow "detached" from the scroll-bar. What is wrong with this code?
Re: [EMF Forms] render view inside a scrollable composite [message #1710201 is a reply to message #1710197] Mon, 05 October 2015 10:38 Go to previous messageGo to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
I lack some SWT experience...

it works - it should be ScrolledComposite, not just Composite
Re: [EMF Forms] render view inside a scrollable composite [message #1710327 is a reply to message #1710201] Tue, 06 October 2015 07:06 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Klim,
ScrolledComposites are ugly to use.
This should work:

ScrolledComposite parent = new ScrolledComposite(composite, SWT.V_SCROLL| SWT.H_SCROLL);
render = ECPSWTViewRenderer.INSTANCE.render(parent, vmc);
parent.setExpandHorizontal(true);
parent.setExpandVertical(true);
parent.setContent(render.getSWTControl());
parent.setMinSize(render.getSWTControl().computeSize(SWT.DEFAULT, SWT.DEFAULT));

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] render view inside a scrollable composite [message #1710359 is a reply to message #1710327] Tue, 06 October 2015 08:24 Go to previous message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
perfect

thank you
Previous Topic:[EMF Forms] render views read-only dynamically
Next Topic:[EMF Forms] controls l10n
Goto Forum:
  


Current Time: Sat Apr 20 05:40:14 GMT 2024

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

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

Back to the top