Layout computing problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Layout computing problem


Hi all,
I have problem with computing flex size in Tree.
Just try this example and you'll see. If you open node "Item no.1" and then
open "Item no.2", everything works ok. But When you open "Item no.1", close
it, and after open "Item no.2" and "Item no.1", spacer of nodes in "Item
no1." doesn't recompute its width.

var tree = new qx.ui.tree.Tree("Root");
    backgroundColor : "white",
    border : "inset",
    overflow : "scrollY",
    top : 48,
    left : 20,
    width : 'auto',
    bottom : 48,
var trsGenerator = function(label)
    var trs = qx.ui.tree.TreeRowStructure.getInstance().newRow();
    var spacer = new qx.ui.basic.HorizontalSpacer;
    var box = new qx.ui.layout.HorizontalBoxLayout;
        width : 100,
        backgroundColor : 'red'
    trs.addObject(spacer, true);
    trs.addObject(box, true);
    return trs;
var te1 = new qx.ui.tree.TreeFolder("Item No.1");
var te1_1 = new qx.ui.tree.TreeFolder(trsGenerator('Label 1'));
var te1_2 = new qx.ui.tree.TreeFolder(trsGenerator('Label x'));
var te1_3 = new qx.ui.tree.TreeFolder(trsGenerator('Label xy'));
var te1_4 = new qx.ui.tree.TreeFolder(trsGenerator('Label xyz'));
te1.add(te1_1, te1_2, te1_3, te1_4);

var te2 = new qx.ui.tree.TreeFolder("Item No.2");
var te2_1 = new qx.ui.tree.TreeFolder(trsGenerator("Very very very long
var te2_2 = new qx.ui.tree.TreeFolder(trsGenerator("Label 2"));
var te2_3 = new qx.ui.tree.TreeFolder(trsGenerator("Label 3"));
var te2_4 = new qx.ui.tree.TreeFolder(trsGenerator("Label 4"));

te2.add(te2_1, te2_2, te2_3, te2_4);

Is there any way to fix this?
Thanks, Lukas

View this message in context:
Sent from the qooxdoo-devel mailing list archive at

Check out the new Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
qooxdoo-devel mailing list
[hidden email]