| CreatePartControl [message #314289] |
Fri, 06 April 2007 06:08  |
Eclipse User |
|
|
|
Hi all,
I am writing an eclipse plugin creating its own view. I would like to know
if there is one way to get the size of the parent Composite give me as
parameter inside the create part control method. In fact i supposed that
once this method is finished the composite must be layed out .... ?
I really need to know the size inside the create part control method
itself and not after ....
Thanks in advance
Manuel Selva
|
|
|
|
|
|
| Re: CreatePartControl [message #314517 is a reply to message #314289] |
Mon, 16 April 2007 12:36  |
Eclipse User |
|
|
|
Manuel Selva wrote:
> Hi all,
>
> I am writing an eclipse plugin creating its own view. I would like to
> know if there is one way to get the size of the parent Composite give me
> as parameter inside the create part control method. In fact i supposed
> that once this method is finished the composite must be layed out .... ?
Eclipse doesn't really use that pattern ... sometime after
createPartControl(*) is called, the workbench will call parent.layout()
(any number of times, or resize of window, etc).
Normally, you create a child composite off of "parent" and then set the
appropriate layout manager on it, so you can respond to layout requests.
GridLayout and FormLayout are 2 of the most useful layouts for specific
positioning of controls.
2 other options that *might* work ... one is to create your view
composite as some kind of scrolled composite. Then you can set the size
of your view controls, and the scrolled composite can resize with the
view. The other is to attach a resize listener to the parent composite
.... and respond to resize events (which will be many).
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.04329 seconds