Announcement

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

    TileLayout: overlapping buttons with flow

    Because of strange side effects using GWT FlowPanels, I've testet the TileLayout with layout policy flow. The widgets to render are simple buttons. I will replace them when the TilesLayout works. Unfortunately the buttons are overlapped and not correctly resized as it's shown in the screenshot attached.

    This is my test code:
    Code:
     	public void onModuleLoad() {
    		TileLayout tile = new TileLayout();
    		tile.setSize("100%", "100%");
    		tile.setLayoutPolicy(TileLayoutPolicy.FLOW);
    		tile.setOverflow(Overflow.VISIBLE);
    		tile.setAutoWrapLines(true);
    		tile.setShowEdges(true);
    		tile.setTileHeight(25);
    
    		Button button = new Button("askldjfa_faaskdfjksadfsfa.txt");
    		button.setOverflow(Overflow.VISIBLE);
    		button.setAutoWidth();
    		tile.addTile(button);
    
    		button = new Button("as.png");
    		button.setAutoWidth();
    		button.setOverflow(Overflow.VISIBLE);
    		tile.addTile(button);
    
    		button = new Button("afa_fasfa.txt");
    		button.setOverflow(Overflow.VISIBLE);
    		tile.addTile(button);
    
    		tile.draw();
    	}
    Do I have something forgotten? BTW if I set the tileHMargin property my firefox got frozen.
    Attached Files

    #2
    I tried TileLayout with HStacks and Labels as well. The result isn't much better (see attachment). In my point of view the TileLayout is buggy and I have to go back to GWT's FlowPanel.
    I hope this will be fixed in the next version.
    Attached Files
    Last edited by jschlier; 19 Feb 2010, 10:35.

    Comment


      #3
      Always mention all versions involved when posting (see the FAQ).

      Your problem may be due to third party CSS (see the FAQ).

      If you really think there's a bug, check on the CSS possibility and add the information the FAQ tells you is required, and we'll look at it.

      Comment


        #4
        fyi this sample uses a TileLayout.

        Comment


          #5
          Thanks for the hints. I use smartGWT 2.0. I removed all external CSS without any improvements.
          When I set tile width it works but all elements has the same width. So I no longer think this behavior is a bug. It works as designed. But I need the same like a FlowPanel.

          Basically I migrate my webmail project Cubusmail from GWT-Ext to smartGWT. (https://www.cubusmail.org:8443/demo/)
          Like other webmail applications Cubusmail has a reading pane showing all the message details. Attachments are listed side by side. The list wraps to a new line if it reached the edge. For example:

          aaaaaaaaaaaa.txt bbb.zip ccccccccccccccccc.doc dddddddd.pdf
          eeeeeeeeeeeeeeeee.txt fffffffffffff.gif

          With GWT-Ext I used ColumnLayout which did the same job like FlowPanel. TilesLayout(flow) does only make sense if every tile can have its own width.

          Comment

          Working...
          X