Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Tile grid "flow" layout

    I've successfully built a TileGrid, overriding getTileHTML() to produce the contents of each tile based on the record data. I've set the tile size appropriately but the grid is in a resizable canvas and I would like the number of tiles per line to change based on the width, like a "flow" layout. I've tried not specifying TilesPerLine at all, but then the tiles revert to their default size (50 pixels) and when I attempt to move the resize bar the browser crashes (Safari and Firefox). If I switch to a TileLayout instead, it seems like I lose the databinding aspect that the grid provides. Is there a way to have TileGrid support a "flow" layout?

    #2
    Any suggestions? I took another look at the tile example in showcase and it is using a TileGrid which has the behavior I'm looking for. It looks like the only difference is that it does NOT set the tilesPerLine, but when I try that the tiles revert to their default size (50 pixels) and when I attempt to move the resize bar the browser crashes as I said in my original post.

    Comment


      #3
      Sorry for the delay on this one.. are you actually setting layoutPolicy to flow? See TileLayoutPolicy.

      Comment


        #4
        Setting the layout policy to flow does have the desired effect, but the tile height and width settings are no longer respected. So the tiles now flow as I would like, but each tile is too small to show the complete contents.

        Comment


          #5
          I just upgraded to SmartGWT EE 2.0 and using TileLayoutPolicy.FLOW now works with the tile sizes remaining as specified.

          Thanks!

          Comment

          Working...
          X