View Full Version : Add widget in an specific position

25 Apr 2012, 12:50 AM

I've a ContentPanel that contains 10 LayoutContainer with ids (layout-1, to layout-10).

I would like to add another layoutContainer in an specific position (for example between the 3-4) and with an specific LayoutData.

Right now I only can add it like that:

myContentPanel.add(myLayout, new RowData(1,1, new Margins(0)));
And it appears at the end of my ContentPanel.

And I would need something like...

myContentPanel.addAt(4, myLayout, new RowData(1,1, new Margins(0)));
Where 4 is the position.

Some ideas?


25 Apr 2012, 12:53 AM
There is an insert method that is doing exactly what you are looking for

25 Apr 2012, 1:02 AM
Right in front of my eyes and I didn't see it.

I was looking for an "add" method and there is an "insert", that as you said, does exactly what I need.

Thank you sven.