Problems with scrolling [message #238322] |
Wed, 05 September 2007 11:29 |
Eclipse User |
|
|
|
Originally posted by: abraham8331.gmail.com
Hi
I'm developing a flowchart diagram using draw2d.
I wish to make the view scrollable.The scrollbars are appearing on my window.But when scrolling, it will scroll only a few pixels though my figure is larger than that.
This is the code I am using :
Display display = new Display();
Shell shell=new Shell();
shell.open();
shell.setText("FlowDiagram");
LightweightSystem lws = new LightweightSystem(shell);
ScrollPane scrollpane = new ScrollPane();
scrollpane.setBounds(new Rectangle(90,90,310,300));
final Figure view = new Figure();
scrollpane.setLayoutManager(new ScrollPaneLayout());
Figure simulationFigure = new Figure();
Adding all the figures.....
simulationFigure.add(...);
scrollpane.setContents(simulationFigure);
lws.setContents(scrollpane);
Have anyone got an idea about that.
Please help....
Thanks
Abraham
|
|
|
|
|
|
Re: Problems with scrolling [message #238425 is a reply to message #238322] |
Mon, 10 September 2007 05:52 |
Eclipse User |
|
|
|
Originally posted by: puneet82sri.sify.com
simulationFigure.add(...);
i hope you are using add(Ifigure fig, Rectangle rec) method to add the figures.
and set bounds to each figure you add.
Hope this all helps you.
|
|
|
Powered by
FUDForum. Page generated in 0.02152 seconds