Announcement

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

    setWidth on VLayout is ignored

    I’m calling setWidth on a VLayout but the VLayout expands to fill its containing layout.

    Here’s the code:

    Code:
    [B]public[/B] [B]class[/B] UserErrorPage [B]extends[/B] VLayout {
     
        [B]public[/B] UserErrorPage() {
            setWidth100();
            setHeight100();
            setBackgroundColor("#E8E8E8");
            addMember(header());
        }
     
        [B]private[/B] VLayout header() {
            [B]return[/B] [B]new[/B] VLayout() {
                {
                    setBackgroundColor("#292B2C");
                    setWidth100();
                    setHeight(73);
                    setDefaultLayoutAlign(Alignment.[B][I]CENTER[/I][/B]);
                    addMember(logoContainer());
                }
     
            };
        }
     
        [B]private[/B] VLayout logoContainer() {
            [B]return[/B] [B]new[/B] VLayout() {
                {
                    setLayoutAlign(Alignment.[B][I]CENTER[/I][/B]);
                    setHeight100();
                    setWidth(1920);
                    setBorder("3px dashed yellow");
                }
            };
        }
     
    }

    #2
    See Canvas.overflow

    Comment


      #3
      This was my bad. I miscalculated the width so that it was width of the whole screen rather than the width of the layout.

      Comment

      Working...
      X