Announcement

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

    Labels not expanding to fill height

    I'm new to SmartGWT and am using LGPL v2.2 with GWT 2.0.3 and Firefox 3.6. I'm writing toy applications to get familiar with the framework, and I can't figure out how to make a Label expand to fill the entire vertical height.

    I have a basic VLayout containing three HLayouts:
    Code:
    VLayout root = new VLayout();
    root.setWidth100();
    root.setHeight100();
    
    HLayout header = new HLayout(), main = new HLayout(), footer = new HLayout();
    
    header.setWidth100();
    header.setHeight(32);
    
    main.setWidth100();
    main.setHeight100();
    
    footer.setWidth100();
    footer.setHeight(32);
    
    root.add(header);
    root.add(main);
    root.add(footer);
    These layouts all fill as expected (as verified by turning on borders and testing with DOM Inspector). However, when I add a Label to any of the HLayouts, even if I call setHeight or setHeight100, the Label is only as tall as the text inside it. I even copied and pasted the code from the Showcase Nesting example, and I had the same issue; the Label was only as tall as the text.

    The Showcase example shows fine when loaded from the SmartClient Web site, and everything seems to be working correctly except the height of the Labels. Any tips on where to look for the issue?

    UPDATE: After comparing the computed styles between my code and the Showcase, it appears that the Showcase is rendering in quirks mode. Turning off strict mode causes the Labels to expand properly, but this appears to be a SmartClient bug.
    Last edited by chrylis; 20 Jul 2010, 01:28.

    #2
    After missing this post when I looked before posting myself, someone else has the same problem. It's replicable for me on Firefox and Chrome.

    http://forums.smartclient.com/showthread.php?p=44890

    Comment

    Working...
    X