|
|
Re: changing the colour of the editor canvas [message #178006 is a reply to message #51937] |
Tue, 18 March 2008 20:39  |
Eclipse User |
|
|
|
Hi,
Thomas Meier wrote:
> "sayed" <sayed.shoed@tavant.com> wrote:
>
> > I want to change the colour of the editor canvas.Is there anyway by which
> > I can do this.
>
> Override createFigure() in your DiagramEditPart. By calling
> super.createFigure() you get a reference to the IFigure. You can then set
> the background colour directly for this figure. You also need to set it to
> be opaque.
>
> protected IFigure createFigure() {
> IFigure fig = super.createFigure();
> fig.setBackgroundColor(ColorConstants.green);
> fig.setOpaque(true);
> return fig;
> }
This does indeed change the colour of the canvas, but also hides the
grid. Unless the grid is set to 'Grid in front', but then it is above
all other objects.
How to change the background color and have the grid appear below the
object, but above the canvas?
Thanks,
Jelle.
|
|
|
Powered by
FUDForum. Page generated in 0.03429 seconds