Hello,
i'm trying to add a flexible cell using the grid object.
The goal is to expand when i click in the tree button.
I thought it was the : layout.setRowFlex(0, 1);
But using that the row will start expanded.

Can anyone give me an help.
Here is the code i'm trying to use:


qx.Class.define("novaapp.SideMenu",
{
  extend : qx.ui.window.Window,

  construct : function()
  {
    this.base(arguments, "Side Menu", "");

    // hide the window buttons
    this.setShowClose(true);
    this.setShowMaximize(true);
    this.setShowMinimize(true);

    // adjust size
    this.setWidth(280);
    this.setHeight(590);

    // add the layout
    var layout = new qx.ui.layout.Grid(0, 0);
    layout.setRowHeight(0, 30);
    layout.setColumnWidth(0, 50);
    layout.setRowHeight(1, 30);
    layout.setRowFlex(0, 1);
    layout.setColumnFlex(0, 1);
    layout.setColumnFlex(1, 1);
    this.setLayout(layout);
    this.setContentPadding(0);

    // Create the tree widget
    var tree = new qx.ui.tree.Tree().set({
      width : 200,
      height : 5
    });

    // Create the tree widget
    var tree2 = new qx.ui.tree.Tree().set({
      width : 200,
      height : 5
    });

    // Create a folder and set it the root folder
    var root = new qx.ui.tree.TreeFolder("root");
    var root2 = new qx.ui.tree.TreeFolder("root");
    tree.setRoot(root);
    tree2.setRoot(root2);

    var te1_1 = new qx.ui.tree.TreeFolder("Files");
    var te1_2 = new qx.ui.tree.TreeFolder("Workspace");
    var te1_3 = new qx.ui.tree.TreeFolder("Network");
    var te1_4 = new qx.ui.tree.TreeFolder("Trash");

    // Create some content (leaves) and add it to the "Files" folder:
    var te1_2_1 = new qx.ui.tree.TreeFile("Windows (C:)");
    var te1_2_2 = new qx.ui.tree.TreeFile("Documents (D:)");
    te1_2.add(te1_2_1, te1_2_2);

    // Add the content to the root folder
    root.add(te1_1, te1_2, te1_3, te1_4);

    this.add(tree,{row: 0, column: 0})
    this.add(tree2,{row: 1, column: 0})
  }

});


-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Grid-flexibility-tp5278210p5278210.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to