Layout computing problem

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

Layout computing problem

Tarmaq

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");
tree.set({
    backgroundColor : "white",
    border : "inset",
    overflow : "scrollY",
    top : 48,
    left : 20,
    width : 'auto',
    bottom : 48,
});
tree.addToDocument();
var trsGenerator = function(label)
{
    var trs = qx.ui.tree.TreeRowStructure.getInstance().newRow();
    trs.addLabel(label);
    var spacer = new qx.ui.basic.HorizontalSpacer;
    var box = new qx.ui.layout.HorizontalBoxLayout;
    box.set({
        width : 100,
        backgroundColor : 'red'
    });
    trs.addObject(spacer, true);
    trs.addObject(box, true);
    return trs;
};
var te1 = new qx.ui.tree.TreeFolder("Item No.1");
tree.add(te1);
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");
tree.add(te2);
var te2_1 = new qx.ui.tree.TreeFolder(trsGenerator("Very very very long
label"));
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: http://www.nabble.com/Layout-computing-problem-tp18115566p18115566.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel