Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Limit ScrollableGraphicalViewer height, so it actually scrolls
Limit ScrollableGraphicalViewer height, so it actually scrolls [message #741118] Wed, 19 October 2011 07:38
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi GEF Community.

I embed a GEF viewer in a JFace form, which has a ColumnLayout. One of
the properties of this layout, is that children can grab all the space
they want and as the form is not scrollable, the result is that a
portion of the GEF viewer is not visible. (See screenshot) So I would
like the GEF viewer to have a fixed height or somehow limit itself to
the height of the form. (The latter is likely not possible in a
ColumnLayout in combination with a non-scrollable form).

This is my code, how do I limit the viewer from taking all the height
and start scolling?

// Do some gef here.
ScalableFreeformRootEditPart rootEditPart = new
graphicalViewer = new ScrollingGraphicalViewer();
graphicalViewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);
graphicalViewer.setEditPartFactory(new NodeTypeEditPartsFactory());
graphicalViewer.setContents(new WrappedNodeType(nodeType));

Any hints would be most welcome.
Rgds Christophe Bouhier.
Previous Topic:GEF Palette Creation tool: it's possible to enable/disable?
Next Topic:Limit ScrollableGraphicalViewer height, so it actually scrolls
Goto Forum:

Current Time: Wed Oct 27 02:08:40 GMT 2021

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

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

Back to the top