Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Scrollbar
Scrollbar [message #990434] Wed, 12 December 2012 13:43 Go to next message
Lars Schulte is currently offline Lars SchulteFriend
Messages: 4
Registered: December 2012
Junior Member
I'm pretty new to Graphiti so maybe there's an easy solution to my problem which I just haven't found yet but after some searching without finding anything on this topic I choose to open this topic.

What I'm looking for is the possibility to add a scrollbar to a Pictogram Element. As a easy example remember the EClass thats provided in the tutorial. You use the top space as a Caption and let's assume we want to use the lower space for a description. As such a description can be pretty long but we don't want the shapes to get ridiculous big it would be nice to have a horizontal and/or vertical scrollbar.


Thanks for helping
Lars
Re: Scrollbar [message #990718 is a reply to message #990434] Thu, 13 December 2012 13:20 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Lars,

that is currently not possible. Graphiti does not support something like a
"scrollable composite". If you would like to see such a feature feel free to
open an enhancement request.

Michael
Re: Scrollbar [message #990725 is a reply to message #990434] Thu, 13 December 2012 20:38 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Hi Lars,

I see no support out of the box. My idea, if I really wanted to implement this:

Add a scrollbar to the diagram at the correct position and do the relative positioning of the text shape to the container shape your self.


This is how I add a button to the diagram:

							FigureCanvas fcvs = (FigureCanvas) graphicalViewer.getControl();
							Composite composite = new Composite(fcvs, SWT.NONE);
							
							if(logger.isDebugEnabled()) {
								logger.error(parent);
							}
							composite.setBounds(30, 10, 80, 40);
							composite.setLayout(new FillLayout(SWT.HORIZONTAL));
							Button button = new Button(composite, SWT.NONE);

						
							composite.layout();

[Updated on: Thu, 13 December 2012 20:39]

Report message to a moderator

Re: Scrollbar [message #990785 is a reply to message #990725] Fri, 14 December 2012 09:37 Go to previous message
Lars Schulte is currently offline Lars SchulteFriend
Messages: 4
Registered: December 2012
Junior Member
Thanks for your help. Smile

I guess I follow Andreas idea and try to "custom add" it using SWT.
Previous Topic:Nesting Shapes etc...
Next Topic:Inherit from PolygonImpl
Goto Forum:
  


Current Time: Thu Apr 25 06:22:58 GMT 2024

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

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

Back to the top