Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    128
    Vote Rating
    2
    audra is on a distinguished road

      0  

    Default stretchmax for hboxlayoutcontainer?

    stretchmax for hboxlayoutcontainer?


    Hi,

    Stetchmax doesn't seem to work for an HBoxLayoutContainer... your examples page has an extra long button for the vboxlayoutcontainer, but hboxlayoutcontainer has the same sized 4 buttons...

    It's not working in my product either. gxt 3.0

    Thanks,
    Audra

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    To help us observe what in your use case is triggering any possible issues in HBoxLayoutContainer, please post a short test case implementing EntryPoint that shows the problem you're experiencing. Also, please include what browser you're using.

    In general, we prefer you to use the bug template so that we're able to collect all the information needed for us to test for bugs and prepare fixes quickly.

  3. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    128
    Vote Rating
    2
    audra is on a distinguished road

      0  

    Default


    Required InformationVersion(s) of Ext GWT 3.0 Browser versions and OS
    • ff 11 win 7
    Virtual Machine No Description HBoxStretch seems to work if the height is directly set, but i expect stretch max to stretch to the automatically calcualated longest width as the vboxlayoutcontainer stretchmax does. Run mode both Steps to reproduce the problem
    1. Start running in development mode in Eclipse
    2. Open app in browser
    3. observe the columns are all 500px in height even though only one the columns has a set height.
    4. comment out rowOneColumnOne.setHeight(500); in InnerBeta inner class
    5. save and open in a browser
    6. observe the top row has disappeared
    Expected result all columns adjust to the auto height of the longest column Actual result disapear unless a height is set directly Test case
    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.event.logical.shared.ResizeEvent;
    import com.google.gwt.event.logical.shared.ResizeHandler;
    import com.google.gwt.user.client.ui.Frame;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.Label;
    import com.google.gwt.user.client.ui.ResizeComposite;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
    import com.sencha.gxt.core.client.util.Margins;
    import com.sencha.gxt.widget.core.client.Composite;
    import com.sencha.gxt.widget.core.client.button.TextButton;
    import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.Viewport;
    import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
    import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
    import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign;
    
    
    public class Beta implements IsWidget, EntryPoint{
    
    
        public class InnerBeta extends Composite {
            public InnerBeta() {
                VBoxLayoutContainer rowOneColumnOne = new VBoxLayoutContainer(VBoxLayoutAlign.STRETCH);
                rowOneColumnOne.setBorders(true);
                rowOneColumnOne.setHeight(500);
                BoxLayoutData boxData = new BoxLayoutData(new Margins(5,5,5,5));
                HBoxLayoutContainer r1c1r1 = new HBoxLayoutContainer(HBoxLayoutAlign.MIDDLE);
                rowOneColumnOne.add(new Label("slidjskldfj"), boxData);    
                r1c1r1.add(new TextButton("slidjskldfj"), boxData);
                r1c1r1.add(new TextButton("slidjskldfj"), boxData);
                r1c1r1.add(new TextButton("slidjskldfj"), boxData);
                rowOneColumnOne.add(r1c1r1, boxData);
                rowOneColumnOne.add(new TextButton("slidjskldfj"), boxData);
                
                initWidget(rowOneColumnOne);
            }
        }
        
        @Override
        public Widget asWidget() {
            VBoxLayoutContainer globalContainer = new VBoxLayoutContainer(VBoxLayoutAlign.STRETCH);
            
            HBoxLayoutContainer titleBar = new HBoxLayoutContainer(HBoxLayoutAlign.STRETCH);
            titleBar.setHeight(50);
            titleBar.setBorders(true);
            globalContainer.add(titleBar);
            
            VBoxLayoutContainer resizableContainer = new VBoxLayoutContainer(VBoxLayoutAlign.STRETCH);
            final VerticalLayoutContainer scrollableContainer = new VerticalLayoutContainer();
            scrollableContainer.setScrollMode(ScrollMode.AUTOY);
            scrollableContainer.addResizeHandler(new ResizeHandler() {
                
                @Override
                public void onResize(ResizeEvent event) {
                    scrollableContainer.forceLayout();
                }
            });
            
            BoxLayoutData coverAllData = new BoxLayoutData(new Margins(0,0,0,0));
            coverAllData.setFlex(1);
    
    
    
    
            HBoxLayoutContainer rowOne = new HBoxLayoutContainer(HBoxLayoutAlign.STRETCHMAX);
            rowOne.setBorders(true);
            
            VBoxLayoutContainer rowOneColumnOne = new VBoxLayoutContainer(VBoxLayoutAlign.STRETCH);
            //rowOneColumnOne.setHeight(300);
            rowOneColumnOne.setBorders(true);
            BoxLayoutData boxData = new BoxLayoutData(new Margins(5,5,5,5));
            HBoxLayoutContainer r1c1r1 = new HBoxLayoutContainer(HBoxLayoutAlign.MIDDLE);
            rowOneColumnOne.add(new Label("slidjskldfj"), boxData);    
            r1c1r1.add(new TextButton("slidjskldfj"), boxData);
            r1c1r1.add(new TextButton("slidjskldfj"), boxData);
            r1c1r1.add(new TextButton("slidjskldfj"), boxData);
            rowOneColumnOne.add(r1c1r1, boxData);
            rowOneColumnOne.add(new TextButton("slidjskldfj"), boxData);
            
            VBoxLayoutContainer rowOneColumnTwo = new VBoxLayoutContainer(VBoxLayoutAlign.CENTER);
            rowOneColumnTwo.setBorders(true);
            rowOneColumnTwo.add(new TextButton("slidjskldfj"));
            rowOneColumnTwo.add(new TextButton("slidjskldfj"));
            rowOneColumnTwo.add(new TextButton("slidjskldfj"));
            
            VBoxLayoutContainer rowOneColumnThree = new VBoxLayoutContainer(VBoxLayoutAlign.CENTER);
            rowOneColumnThree.setBorders(true);
            //rowOneColumnThree.setHeight(100);
            rowOneColumnThree.add(new TextButton("slidjskldfj"));
            
            rowOne.add(rowOneColumnOne, coverAllData);
            rowOne.add(new InnerBeta(), coverAllData);
            rowOne.add(rowOneColumnThree, coverAllData);
            
            scrollableContainer.add(rowOne);
            
            HBoxLayoutContainer rowTwo = new HBoxLayoutContainer(HBoxLayoutAlign.STRETCH);
            rowTwo.setBorders(true);
            rowTwo.setHeight(300);
            
            BoxLayoutData coverTwoData = new BoxLayoutData(new Margins(0,0,0,0));
            coverTwoData.setFlex(2);
            
            VBoxLayoutContainer rowTwoColumnOne = new VBoxLayoutContainer(VBoxLayoutAlign.CENTER);
            rowTwoColumnOne.setBorders(true);
            rowTwoColumnOne.add(new TextButton("slidjskldfj"));
            rowTwoColumnOne.add(new TextButton("slidjskldfj"));
            rowTwoColumnOne.add(new TextButton("slidjskldfj"));
            rowTwoColumnOne.add(new TextButton("slidjskldfj"));
            rowTwoColumnOne.add(new TextButton("slidjskldfj"));
            
            VBoxLayoutContainer rowTwoColumnTwo = new VBoxLayoutContainer(VBoxLayoutAlign.STRETCH);
            rowTwoColumnTwo.setBorders(true);
            Frame frame = new Frame("http://www.google.com/");
            rowTwoColumnTwo.add(frame, coverAllData);
            //rowTwoColumnTwo.add(new TextButton("slidjskldfj"));
            //rowTwoColumnTwo.add(new TextButton("slidjskldfj"));
            
            rowTwo.add(new Frame("http://www.google/"), coverAllData);
            
            rowTwo.add(frame, coverTwoData);
            
            scrollableContainer.add(rowTwo);
            
            resizableContainer.add(scrollableContainer, coverAllData);    
            globalContainer.add(resizableContainer, coverAllData);
            Viewport viewport = new Viewport();
            viewport.add(globalContainer);
            
            
            return viewport;
        }
    
    
        @Override
        public void onModuleLoad() {
            RootPanel.get().add(asWidget());
            
        }
    
    
    }
    Helpful InformationScreenshot or video
    • «Link to attachment»
    Live test«http://… Address for a test case for this bug on a running server»Debugging already done
    • «none»
    Possible fix«Not provided»

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    I'm sorry for the delay in responding to this - I'm going over all layout-related issues I can find and making sure that they appear to be taken care of, either due to related fixes being made, or from reported issues just not being marked as closed.

    As near as I can tell, the HBoxLayout example does behave properly, but the idea of 'stretchmax' doesnt really make sense the way that example is configured. In an HBoxLayoutContainer, STRETCHMAX means 'look for the tallest element, and draw all other children the height' - no button is taller than any other, so none need changes. To confirm that it is working in the example, I modified the behavior of the "Align: stretchmax" button:
    Code:
        lcwest.add(createToggleButton("Align: stretchmax", new ValueChangeHandler<Boolean>() {
    
          public void onValueChange(ValueChangeEvent<Boolean> event) {
            if (event.getValue()) {
              HBoxLayoutContainer c = new HBoxLayoutContainer();
              c.setPadding(new Padding(5));
              c.setHBoxLayoutAlign(HBoxLayoutAlign.STRETCHMAX);
    
              c.add(new TextButton(button1Text), new BoxLayoutData(new Margins(0, 5, 0, 0)));
              c.add(new TextButton(button2Text), new BoxLayoutData(new Margins(0, 5, 0, 0)));
              c.add(new TextButton(button3Text), new BoxLayoutData(new Margins(0, 5, 0, 0)));
              TextButton child = new TextButton(button4Text);
              child.setHeight(200);
              c.add(child, new BoxLayoutData(new Margins(0)));
    
              addToCenter(c);
            }
          }
        }), vBoxData);
    and it seemed to behave - all items were the size of the last item.

    I've also run your example, and been unable to observe an issue, at least by trying to follow your basic steps. I ran the example, the commented out the 3rd line in the InnerBeta() constructor and ran it again. I did observe a difference - the three containers in the middle row are now shorter than the first run, but all three rows appear to be visible.

    I can't reproduce it with latest in SVN, nor with 3.0.0, and while the version number you listed was "3.0", I'm not certain which specific point release or beta/release candidate that might refer to.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."