Announcement

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

    Layout issue

    Hi all,

    I have one problem with layout. I try to explain it on example. I have one VLayout with fixed width. This layout contains two members with width="100%", so I would like to fill this VLayout with members into width. But if one member overflow fixed size of VLayout, than VLayout is resized but second member still has original size of VLayout. Here is my example:

    Code:
    isc.VLayout.create({
        width: 300,
        overflow : "visible",
        height: 300,
        members: [
            isc.Canvas.create({
                width: "100%",
                backgroundColor:"red",
                height : 10
            }),
            isc.Canvas.create({
                width: "100%",
                contents : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                backgroundColor:"yellow",
                height : 10
            })
        ]
    });
    So is there any way how to implement it correctly? Or is it bug?

    Thanks.

    Jirka

    #2
    Layouts will not try to size members to the largest overflowing member since this potentially leads to infinite loops, or at the least, lots and lots of extra resizes.

    If there is a specific member that is expected to be largest, you can add a resized() handler to it and size the layout as a whole to match its size.

    Comment

    Working...
    X