Hi Bill, first, there's no TileLayout in Jewel. There's "TileHorizontalLayout" and " TileVerticalLayout", and the second has some little flaws due to browser bugs depending on the browser and version used. So better to use the first when possible.
second not always is needed to remove the old layout bead in this case you can do just the following code (but this made me think in implement some kind of bead to tear down the old one when a developer plans to switch layouts at runtime): var tile:TileHorizontalLayout = new TileHorizontalLayout(); tile.horizontalGap = 6; tile.columnWidth = 100; tile.requestedColumnCount = 3; list.addBead(tile); // this is needed for now as a workaround list.dispatchEvent(new Event("layoutNeeded")); I detect there's a problem with tile layout since it's not triggering layout as you add it on the fly. I committed a fix some minutes ago. So if you are up to date with the repo remove the last line!, then until you update you can use that line This layout works a bit differently than the rest of jewel layouts, since that can't be done just with CSS like other layouts, it requires JS calculations. Maybe if we implement it with the new css grid layout... but that will mean it will not work in IE11. HTH Carlos El vie, 26 feb 2021 a las 3:46, Bilbosax (<waspenc...@comcast.net>) escribió: > I'm having trouble changing the layout of a list using actionscript on the > fly. For instance, if I want to change the layout from a horizontal layout > to a tile layout in actionscript, this is not working: > > > var hl:HorizontalLayout = new HorizontalLayout(); > imageList.removeBead(hl); > var tile:TileLayout = new TileLayout(); > imageList.addBead(tile); > > <j:List localId="imageList" className="imageListItemRenderer" > click="preparePhotos(event)"> > <j:beads> > <j:HorizontalLayout/> > </j:beads> > </j:List> > > > Any suggestions? > > > > -- > Sent from: http://apache-royale-users.20374.n8.nabble.com/ > -- Carlos Rovira Apache Member & Apache Royale PMC *Apache Software Foundation* http://about.me/carlosrovira