SWT Layouts.. [message #460362] |
Wed, 24 August 2005 09:28  |
Eclipse User |
|
|
|
Hi,
I'm trying to fill a screen with a composite, then at somepoint this composite gets hidden, and a new one is created which also needs to fill the screen.. eventually this is disposed and the original composite is called back with setVisible(true).
Now, before I used layout managers within these composites I was simply using setSize( screen width, height) to fill the screen with them. But this seems to no longer work (just a white screen appears).
So I decided to try using fill layout on the shell; which works for the first screen, but no matter what I do (create new filllayout/call layout() etc.) I can't get the second to appear.. (once again it will just turn into a white screen).
Argh, help? :)
Coding this for a pocketpc, first time using SWT.
|
|
|
Re: SWT Layouts.. [message #460369 is a reply to message #460362] |
Wed, 24 August 2005 09:37   |
Eclipse User |
|
|
|
Matt,
The StackLayout is what your need.
Make sure you call shell.layout() after changing the topControl value of
the layout.
Regards,
Olivier.
Matt wrote:
> Hi,
>
> I'm trying to fill a screen with a composite, then at somepoint this composite gets hidden, and a new one is created which also needs to fill the screen.. eventually this is disposed and the original composite is called back with setVisible(true).
>
> Now, before I used layout managers within these composites I was simply using setSize( screen width, height) to fill the screen with them. But this seems to no longer work (just a white screen appears).
>
> So I decided to try using fill layout on the shell; which works for the first screen, but no matter what I do (create new filllayout/call layout() etc.) I can't get the second to appear.. (once again it will just turn into a white screen).
>
> Argh, help? :)
>
> Coding this for a pocketpc, first time using SWT.
|
|
|
|
|
Re: SWT Layouts.. Ok.. argh? [message #460398 is a reply to message #460362] |
Wed, 24 August 2005 10:48  |
Eclipse User |
|
|
|
Right.. so I've managed to get it working with FillLayout..
The second composite is there if I set items using setBounds.. but as soon as I try to use a layout on it (e.g. gridlayout).. nothing will appear..
(I know the layout code is correct as it's the same code being used on the first composite!)..
argh?! :(
|
|
|
Powered by
FUDForum. Page generated in 0.08220 seconds