Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    68
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default FieldLabel and VerticalLayoutContainer

    FieldLabel and VerticalLayoutContainer


    Version(s) of Ext GWT
    3.0.3

    Browser versions and OS
    • Firefox 18.02, Windows 8
    Virtual Machine
    No

    Description
    When a VerticalLayoutContainer contains FieldLabel widgets, the height of the container after layout will be taller than that of the outer container.

    Run mode
    Development mode

    Steps to reproduce the problem
    1. Run attached code sample
    2. Measure height of container
    3. See that the container is taller than the 1000px defined
    Expected result
    Conainer height should be 1000px.

    Actual result
    Container height is approx 1022px.

    Test case
    Code:
    public class VerticalLayout implements EntryPoint {
    
    
        @Override
        public final void onModuleLoad() {
            final VerticalLayoutContainer container = new VerticalLayoutContainer();
            RootPanel.get().add(container);
    
    
            final VerticalLayoutData autoLayoutData = new VerticalLayoutData(1, -1);
            final VerticalLayoutData fillLayoutData = new VerticalLayoutData(1, 1);
    
    
            container.add(new FieldLabel(new TextField(), "1"), autoLayoutData);
            container.add(new FieldLabel(new TextField(), "2"), autoLayoutData);
            container.add(new FieldLabel(new TextField(), "3"), autoLayoutData);
            container.add(new FieldLabel(new TextField(), "4"), autoLayoutData);
            container.add(new FieldLabel(new TextField(), "5"), autoLayoutData);
            container.add(new TextArea(), fillLayoutData);
    
    
            container.setPixelSize(1000, 1000);
        }
    }

  2. #2
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    68
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default


    This also applies to version 3.0.4

  3. #3
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    68
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default


    Still applies to GXT version 3.0.6

  4. #4
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    68
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default


    This is a code sample that better visualizes this problem:

    Code:
    public class FieldLabelCalculatedSize implements EntryPoint {
    
    
        @Override
        public void onModuleLoad() {
            final VerticalLayoutContainer container = new VerticalLayoutContainer();
    
    
            final FramedPanel panel = new FramedPanel();
            panel.setHeadingText("Oversized container");
            panel.setWidget(container);
    
    
            RootPanel.get().add(panel, 10, 10);
    
    
            final VerticalLayoutData autoLayoutData = new VerticalLayoutData(1, -1);
            final VerticalLayoutData fillLayoutData = new VerticalLayoutData(1, 1);
    
    
            container.add(new FieldLabel(new TextField(), "1"), autoLayoutData);
            container.add(new FieldLabel(new TextField(), "2"), autoLayoutData);
            container.add(new TextArea(), fillLayoutData);
            container.add(new FieldLabel(new TextField(), "3"), autoLayoutData);
            container.add(new FieldLabel(new TextField(), "4"), autoLayoutData);
    
    
            panel.setPixelSize(500, 500);
        }
    }
    As you can see, only half of the last field will be shown. This is because the FieldLabel widget reports incorrect size to its parent. The problem is even worsened when label alignment is set to be be TOP.