Announcement

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

    Help with Windows in a Tilelayout

    I'm using SmartGWT 2.2 and I'm looking to implement a tilelayout where each tile is a Window.

    I'd like to be able to snap resize the windows to a grid and also drag them around. The problem is that it is possible to drag one window on top of another. How do I prevent this from happening?

    Here is the code for my Tilelayout

    Code:
    		tileLayout.setSize("1045px", "800px");
    		tileLayout.setChildrenSnapToGrid(true);
    		tileLayout.setChildrenSnapResizeToGrid(true);
    		tileLayout.setLayoutPolicy(TileLayoutPolicy.FLOW);
    		tileLayout.setOverflow(Overflow.VISIBLE);
    		tileLayout.setLayoutMargin(0);
    		tileLayout.setTileWidth(330);
    		tileLayout.setTileHeight(230);
    		tileLayout.setSnapVGap(220);
    		tileLayout.setSnapHGap(330);
    		tileLayout.setTilesPerLine(3);
    To that tilelayout I add 9 windows (which appear in a 3x3 grid). Here is my window code:

    Code:
    		setSize("320", "210");
    		setCanDragResize(true);
    		setShowMaximizeButton(true);
    Please help - I've spent a lot of time enabling and disabling various options without any success!

    #2
    Take a look at the PortalLayout and PortalColumn classes, those are most likely closer to your use case.

    Comment

    Working...
    X