Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » scroll draw2d on a swt canvas
scroll draw2d on a swt canvas [message #447708] Thu, 16 December 2004 13:43 Go to next message
Eclipse UserFriend
Originally posted by: ssc.acentic.net

Hi

I have a diagram example, which I took from the GEF page (
http://eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2d.ht ml ) and placed
it into a CTabItem. To make this work in the first place I put a Canvas in
the CTabItem and then placed the LightweightSystem on the Canvas. Basically
it works perfect,.... BUT how can I make this scrollable ??? If the diagram
is bigger then the shell, the overflow is lost.

I tried to put a ScrollComposite between the CTabItem and the Canvas but
that broke it and the diagram was not visible anymore.

Any idee how I can make this scrollable ?

-Sebastian
Re: scroll draw2d on a swt canvas [message #447922 is a reply to message #447708] Wed, 22 December 2004 00:23 Go to previous message
Liam Morley is currently offline Liam MorleyFriend
Messages: 47
Registered: July 2009
Member
I found a solution for this a while ago before switching to SWT drawing
functions and away from GEF... unfortunately this is before we started
using source control for the project, so I don't have the source.:(
Though it is possible. Have you tried using FigureCanvas?


Sebastian Scholz wrote:
> Hi
>
> I have a diagram example, which I took from the GEF page (
> http://eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2d.ht ml ) and placed
> it into a CTabItem. To make this work in the first place I put a Canvas in
> the CTabItem and then placed the LightweightSystem on the Canvas. Basically
> it works perfect,.... BUT how can I make this scrollable ??? If the diagram
> is bigger then the shell, the overflow is lost.
>
> I tried to put a ScrollComposite between the CTabItem and the Canvas but
> that broke it and the diagram was not visible anymore.
>
> Any idee how I can make this scrollable ?
>
> -Sebastian
>
>


--
Liam Morley
Computer Science Undergraduate
Worcester Polytechnic Institute
Previous Topic:TableTreeViewer and its Model
Next Topic:Erasing something drawn with drawString
Goto Forum:
  


Current Time: Fri Apr 19 21:33:12 GMT 2024

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

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

Back to the top