Getting closer Carlos, but still struggling. The only TileLayout that looks
good and behaves how I need is the Basic TileLayout. I am changing the
layout of an image gallery based on whether the browser is wider than it's
height. If it is in a landscape mode, I want the layout to use a Basic
TileLayout. If it is in portrait mode, I want it to use a Jewel
HorizontalLayout. Based on what you said above, I am not trying to remove
the previous layout bead before setting a new one, just trying to change it
in actionscript on the fly. I can get it to go from the Jewel
HorizontalLayout to the Basic TileLayout, but I can't get it to go from the
Basic TileLayout back to the Jewel HorizontalLayout, it stays in Basic
TileLayout. You'll notice that I'm using a different itemrenderer for each
layout. Here is a simplified version of what I have:
import org.apache.royale.html.beads.layouts.TileLayout;
import org.apache.royale.jewel.beads.layouts.HorizontalLayout;
if (appWidth > appHeight) {
imageList.className = "imageListItemRenderer";
var tile:TileLayout = new TileLayout();
tile.columnWidth = 200;
tile.rowHeight = 150;
tile.numColumns = 3;
imageList.addBead(tile);
imageList.dispatchEvent(new Event("layoutNeeded"));
} else {
imageList.className = "imageListItemRendererHorizontal";
var hl2:HorizontalLayout = new HorizontalLayout();
imageList.addBead(hl2);
imageList.dispatchEvent(new Event("layoutNeeded"));
}
<j:List localId="imageList" className="imageListItemRendererHorizontal"
click="preparePhotos(event)">
<j:beads>
<j:HorizontalLayout/>
</j:beads>
</j:List>
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/