Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    4
    Vote Rating
    0
    creakie is on a distinguished road

      0  

    Default HorizontalLayoutContainer in ContentPanel does not work, height 0px (with example)

    HorizontalLayoutContainer in ContentPanel does not work, height 0px (with example)


    Hello all together,

    I've got a HorizontalLayoutContainer inside a ContentPanel. But the HorizontalLayoutContainer will have an height of 0px and not the height it should have.

    Here is a little example that contains 2 ContentPanels: One with the HorizontalLayoutContainer and one with a VerticalLayoutContainer. The VerticalLC works.

    Version(s) of Ext GWT
    Ext GWT 3.0.1

    Brower versions and OS (and desktop environment, if applicable)
    IE8, Chrome21, Win7

    Run mode
    Both

    Test case
    PHP Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.Label;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.core.client.util.Margins;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer.HorizontalLayoutData;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;


    public class 
    Bugtest implements IsWidgetEntryPoint {
        public 
    Widget asWidget() {
            
    HorizontalLayoutContainer baseContainer = new HorizontalLayoutContainer();


            
    ContentPanel container1 = new ContentPanel();
            
    container1.setHeadingText("Testcase HorizontalLC");
            
    baseContainer.add(container1, new HorizontalLayoutData(300, -1));


            
    HorizontalLayoutContainer horizontalContainer = new HorizontalLayoutContainer();
            
    container1.add(horizontalContainer);


            
    horizontalContainer.add(new Label("Some content..."));


            
    ContentPanel container2 = new ContentPanel();
            
    container2.setHeadingText("Testcase VerticalLC");
            
    baseContainer.add(container2, new HorizontalLayoutData(300, -1,
                    new 
    Margins(0005)));


            
    VerticalLayoutContainer verticalContainer = new VerticalLayoutContainer();
            
    container2.add(verticalContainer);


            
    verticalContainer.add(new Label("Some content..."));


            return 
    baseContainer;
        }


        @
    Override
        
    public void onModuleLoad() {
            
    RootPanel.get().add(asWidget());
        }

    Screenshot
    Web Application Starter Project - Google Chrome_2012-08-15_11-08-45.png

    If the ContentPanel has a fixed height I would see the content of the HorizontalLayoutContainer. But I want a dynamical height :/

    So I think this is a bug. Or is there something I'm doing wrong?

    Thanks!
    Last edited by creakie; 15 Aug 2012 at 3:23 AM. Reason: added some extra information