View Full Version : How to add new widget dynamicly

11 May 2010, 7:27 AM
when I use gwt panel to add a widget dynamicly in runtime it work well, but I use the Layoutcaontainer to add a widget it didn't work .It said the render will be called when add a widget to a gwt panel...I cofused about the add function of layoutcontainer, It won't render his child witch added to it...

11 May 2010, 7:55 AM
i don't understand very well what you wrote but i have you try to layout() your panel after adding he widget, because the widget could have be added but not shown.
this method refresh your panel or layoutcontainer...

11 May 2010, 1:26 PM
or say
myComponent.setLayoutOnChange(true) this should update the view after the add method aswell

11 May 2010, 1:29 PM
I dont suggest to set that to true. It is better to call it manually only in cases you really need it.

11 May 2010, 6:25 PM
thank you, I'm really appreciated it. layout has worked.

11 May 2010, 11:25 PM
cool !!! it was a pleasure !!!