Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » problem in XY Layout-while creating scrollbar
problem in XY Layout-while creating scrollbar [message #247200] Mon, 09 February 2009 07:43 Go to next message
Debasis Mishra is currently offline Debasis Mishra
Messages: 36
Registered: July 2009
Member
I am having trouble getting scrollbars to work correctly. They just sit
there grayed-out and do nothing:


FigureCanvas canvas = new FigureCanvas(shell);
canvas.setScrollBarVisibility(FigureCanvas.ALWAYS);


IFigure figure = new Figure();
XYLayout layout = new XYLayout();
figure.setLayoutManager(layout);

Label label = new Label("Banana");
figure.add(label);
label.setSize(label.getPreferredSize());
label.setLocation(new Point(30, 30));

canvas.setContents(figure);

Could anybody please help me in solving this .

ThanksinAdvance
Debasis
Re: problem in XY Layout-while creating scrollbar [message #247222 is a reply to message #247200] Wed, 11 February 2009 20:40 Go to previous message
Anthony Hunter is currently offline Anthony Hunter
Messages: 446
Registered: July 2009
Senior Member
Hi Debasis

Check out the draw2d ScrollPaneExample

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gef/exa mples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/exa mples/scrollpane/ScrollPaneExample.java?root=Tools_Project&a mp;view=markup

Cheers...
Anthony

"Debasis Mishra" <debasis1982@gmail.com> wrote in message
news:5247dc4623b706b13322d363fce75e05$1@www.eclipse.org...
>I am having trouble getting scrollbars to work correctly. They just sit
>there grayed-out and do nothing:
>
>
> FigureCanvas canvas = new FigureCanvas(shell);
> canvas.setScrollBarVisibility(FigureCanvas.ALWAYS);
>
>
> IFigure figure = new Figure();
> XYLayout layout = new XYLayout();
> figure.setLayoutManager(layout);
>
> Label label = new Label("Banana");
> figure.add(label);
> label.setSize(label.getPreferredSize());
> label.setLocation(new Point(30, 30));
>
> canvas.setContents(figure);
>
> Could anybody please help me in solving this .
>
> ThanksinAdvance
> Debasis
>
>
>
Previous Topic:[Announce] GEF 3.5.0 I200902051436 is available
Next Topic:add border shape
Goto Forum:
  


Current Time: Tue Jul 22 15:48:22 EDT 2014

Powered by FUDForum. Page generated in 0.01504 seconds