Announcement

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

    Objects Added to TileLayout Do Not Resize Properly

    I have a TileLayout which I am attempting to add Windows that contain HTMLFlows dynamically. I can add tiles using addTile(foo). However when I drag the Window to resize, the mouse grabs the edge, drags it, and then when the mouse is released, the window snaps back to its original size.

    I have used setCanDragResize(true) on both the window object and the TileLayout. Why does it snap back?

    I have searched and referenced this post as a guide: http://forums.smartclient.com/showth...t=tile+windows

    Additionally, can TileWidth and TileHeight be set again at runtime, after the TileLayout has been initialized? Can both the tileWidth and tileHeight be calculated dynamically as noted in the TileLayout documentation, e.g. not be limited to choosing one or the other.

    Width of each tile in pixels. See tileSize. If LayoutPolicy is "fit", expandMargins is false, tilesPerLine is set, Orientation is "horizontal", and tileWidth is not set, tileWidth will be computed automatically based on tilesPerLine
    Height of each tile in pixels. See tileSize. If LayoutPolicy is "fit", expandMargins is false, tilesPerLine is set, Orientation is "vertical", and tileHeight is not set, tileHeight will be computed automatically based on tilesPerLine.
    Last edited by ls3674; 12 Mar 2012, 13:51.

    #2
    The "snap back" when dragging is a result of the fact that the tileLayouts manage the size of their member tiles.

    The first question to ask on this is - what is the behavior you're actually after here? Do you want all tiles to resize to match the new size of the tile?
    Or do you want to allow a single tile to expand, such that the tiles in the layout have differing sizes, and have the following items be moved to accommodate the changed space? (Or are you after something else?)


    In terms of your second question - yes the APIs setTileWidth() / setTileHeight() and setTileSize() will allow for changing of explicit tile sizing on the fly.
    We don't currently have a setter for "setTilesPerLine()" which would recalculate widths dynamically if not explicitly set, but since you raise it, this does make sense to have. We'll add this API. This will be added to the 3.1d branch for now. If you'd like it ported to 3.0p, let us know and we can do this.

    Thanks
    Isomorphic Software

    Comment

    Working...
    X