Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Layout composite weird behaviour
Layout composite weird behaviour [message #741471] Wed, 19 October 2011 15:09 Go to next message
Artur Kronenberg is currently offline Artur Kronenberg
Messages: 159
Registered: August 2009
Senior Member
Hi,

I have a composite that create a variable amount of text fields and labels next to each other in a grid layout wiith two columns.

Some of that Text fields are higher then others, depending on how much content is in there.

On a new selection, I dispose every child in the parent container and create the new children. After that I call layout on the parent container to lay out the new content.

Sometimes, I can't figure out when, the textfields are overlapping or they aren't shown at all. The selection is a mouse selection. If, after the first layout, I klick on the same object, everything is rendered fine.

Has anyone ever seen such behaviour and can give me a hint on how to solve this problem? If you need any further information, or maybe a screenshot, let me know. I'll be happy to provide.

Kind regards,
-- artur
Re: Layout composite weird behaviour [message #741980 is a reply to message #741471] Thu, 20 October 2011 04:10 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
instead of composite.layout(),try composite.layout(true) or composite.layout(true,true) depending on your parent child hierarchy



---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: Layout composite weird behaviour [message #742369 is a reply to message #741980] Thu, 20 October 2011 12:38 Go to previous message
Artur Kronenberg is currently offline Artur Kronenberg
Messages: 159
Registered: August 2009
Senior Member
Thanks for your reply. It was my bad. Layout(true) does actually work, however since I have a scrolled composite, I had to set the minimum size of that container and I was setting a new size after laying out the controls. I reversed the order and everything seems to work just fine.
Previous Topic:How to add a separator between two tree items
Next Topic:Swt Print Preview
Goto Forum:
  


Current Time: Thu Oct 23 20:03:53 GMT 2014

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

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