|
Re: HowTo get scroll bars to work in draw2d.FigureCanvas? [message #216199 is a reply to message #216191] |
Tue, 16 May 2006 07:31 |
Eclipse User |
|
|
|
Originally posted by: rajakididi.hotmail.com
Hey Paul
Try this if it works ::
Composite parent;
// created on some child of the Composite passed in from Eclipse
to my edit-part
FigureCanvas canvas = new FigureCanvas(parent, SWT.H_SCROLL |
SWT.V_SCROLL);
The second argument is the style. Try it. It should work.
Melanie
|
|
|
|
|
|
Re: HowTo get scroll bars to work in draw2d.FigureCanvas? [message #218015 is a reply to message #216356] |
Fri, 16 June 2006 17:01 |
Eclipse User |
|
|
|
Originally posted by: tanmay.cmu.edu
Another way is to use ScrollPane in Draw2D api.
Assuming you have your figure in object 'figure' and LightWeightSystem as
'lws'. All you have to do is
ScrollPane scp = new ScrollPane();
scp.setContents(figure);
lws.setContents(scp);
tanmay
On 5/17/06 10:08 AM, in article e4fap7$eao$1@utils.eclipse.org, "Paul
Keyser" <rolarenfan@earthlink.net> wrote:
> Excellent! Thaanks! I knew it would something simple (I was not setting the
> contents of the LWS to
> the Viewport but to the IFigure). And it works with scrollbars' visibility set
> to AUTOMATIC, too.
>
> BTW, do you know what the effect of this call is:
>
> canvas.getViewport().setContentsTracksWidth(true)
>
> (doesn't seem to do anything, and the javadocs are not, um, clear).
>
> thanks,
> Paul
|
|
|
Powered by
FUDForum. Page generated in 0.03374 seconds