PDA

View Full Version : Usage of forceLayout in Gxt 3 Beta 2



BerndM
19 Jan 2012, 10:11 AM
Hi guys,

When I create a widget, lets say a BorderLayoutContainer named B and display it for the first time, everything is fine. When I add another widget C to the BorderLayoutContainer later in time, lets say 5 seconds later, it is not displayed automatically. I will have to call forceLayout on the BorderLayoutContainer B manually in order to display the newly added widget correctly. In more compilcated cases it's also required to defer this call to forceLayout() and make sure that forceLayout() is called at the right time. I just wanted to know from you guys if this is how you work with GXT and dynamic layouts or if there is a more elegant way or if I'm just missing something.

Thanks in advance!
Bernd

sven
19 Jan 2012, 10:17 AM
Everytime you modify a "resizecontainer" you will need to call forceLayout. This was also the same way in GXT 2.