I have to extend the class Grid by creating a new class and putting it into a
separate file.  I believe this is necessary but I've seen demo code with
several classes in a file.

The getHeightForWidth method returns a function that needs to compute the
table height.  How can it access the table if the table is in a class is in
a different file?

Anyway I tried this:

I put this class in a file.  The computeHeight function is in the window
that contains the table. I'm sure there more elegant ways to access the
window than saving it in the Application class...

qx.Class.define("admin.TableGrid",
{
  extend : qx.ui.layout.Grid,

  members :
  {
    getHeightForWidth: function(w) {
      return qx.core.Init.getApplication().editPermsWindow.computeHeight();
    }

  }
});


In the window class I have a member function just like yours

    computeHeight : function () {
            return this.table.getRowHeight() *  
this.table.getTableModel().getRowCount()+this.table.getHeaderCellHeight();
    }

and in this class I create the container and the layout like this:

     this.table = this.createTable();

     var layout = new admin.TableGrid();
     var container = new qx.ui.container.Composite(layout);
     
     container.add(this.table, {row: 0, column: 0});

However the computeHeight method never gets called.  What am I doing wrong
here?






--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Change-height-of-Table-cell-editor-tp6373819p6378004.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to