Scaling & Scrolling [message #208524] |
Sat, 04 February 2006 12:58 |
Eclipse User |
|
|
|
Originally posted by: ebay.ievolve.com.au
Hi,
I've got a FigureCanvas containing a ScalableFreeformLayeredPane.
When I scale the ScalableFreeformLayeredPane and its children are no
longer fully visible, no scrollbars appear. How can I make the
scrollbars appear?
Thanks,
Sam
composite = new Composite(parent, SWT.BORDER);
composite.setLayout(new FillLayout());
canvas = new FigureCanvas(composite);
parentLayer = new ScalableFreeformLayeredPane();
parentLayer.setLayoutManager(new FreeformLayout());
RoundedRectangle test = new RoundedRectangle();
test.setBackgroundColor(ColorConstants.blue);
parentLayer.add(test);
parentLayer.setConstraint(test,new Rectangle(100,100,300,200));
canvas.setContents(parentLayer);
|
|
|
Re: Scaling & Scrolling (Scrollbars won't appear) [message #208685 is a reply to message #208524] |
Wed, 08 February 2006 05:49 |
Eclipse User |
|
|
|
Originally posted by: ebay.ievolve.com.au
Nobody has any ideas?
This seems like it should be pretty straight-forward.
There must be something simple I'm doing wrong.
To clarify, I'm using Draw2D.
When I scale the ScalableFreeformLayeredPane, the extents of its
children grow beyond that of the FigureCanvas.
However, this does not trigger the scrollbars to appear.
How can I make the scrollbars appear in this situation.
I experimented with adding an extentListener to the
ScalableFreeformLayeredPane, in which I tried to change the preferred
size of the FigureCanvas's viewport. I couldn't get this working.
Any advice is appreciated.
Thanks,
Sam
Sam wrote:
> Hi,
>
> I've got a FigureCanvas containing a ScalableFreeformLayeredPane.
>
> When I scale the ScalableFreeformLayeredPane and its children are no
> longer fully visible, no scrollbars appear. How can I make the
> scrollbars appear?
>
> Thanks,
> Sam
>
>
>
> composite = new Composite(parent, SWT.BORDER);
> composite.setLayout(new FillLayout());
>
> canvas = new FigureCanvas(composite);
>
> parentLayer = new ScalableFreeformLayeredPane();
>
> parentLayer.setLayoutManager(new FreeformLayout());
>
> RoundedRectangle test = new RoundedRectangle();
> test.setBackgroundColor(ColorConstants.blue);
> parentLayer.add(test);
> parentLayer.setConstraint(test,new Rectangle(100,100,300,200));
>
> canvas.setContents(parentLayer);
|
|
|
Powered by
FUDForum. Page generated in 0.02545 seconds