How to use a Layout Manager in a Element [message #86331] |
Tue, 19 December 2006 03:56  |
Eclipse User |
|
|
|
Originally posted by: no.spam.thanks
Hi,
I have a Element (Display) with some Child Elements (TextField) inside,
both are drawn as Rectangles. The Display has a Compartment which should
contain all the TextFields. Without additional Layout Information,
TextFields are painted, one below the other, in the upper left corner of
the Display's TextField Compartment. But I need the TextFields
"freefloating", alligned to a grid inside the Compartment Element.
I have tried to add several different layouts, but either there was no
effect or I got some errors in the generated Code (e.g. using GridLayout -
"org.eclipse.gmf.internal.codegen.draw2d.GridLayout" cannot be resolved).
That's a bit frustrating :)
Here are my questions:
1) How is the correct approach to add a LayoutManager?
2) How can I allign the TextFields on a Grid inside the Compartment of the
Display (I hope this can be done by a LayoutManager)
|
|
|
Re: How to use a Layout Manager in a Element [message #87359 is a reply to message #86331] |
Fri, 22 December 2006 08:47  |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Christian Barth wrote:
> Without additional Layout Information,
> TextFields are painted, one below the other, in the upper left corner of
> the Display's TextField Compartment. But I need the TextFields
> "freefloating", alligned to a grid inside the Compartment Element.
This Layout is called "List Layout", it is the default layout for
compartments. If you want to change it to a floating layout you can edit
the "List Layout" property in your .gmfgen file. Search for your
compartment in this file and in the properties of the compartment there
is the "List Layout" proberty. Set this to false will change the layout
to floating.
The second part, alligned to a grid, you can archive by setting a grid
in the diagram option at runtime.
So you don't need to write your own layout or something like that.
Hth
Jens
|
|
|
Powered by
FUDForum. Page generated in 0.10241 seconds