Forgot the example :-)

Ulrich Möllmann schrieb:
Hi all,

I tried to build up an application which has a vertical splitpane
(panes tiled "1*", "1*"). In both panes should be placed a table
with dynamic height ("100%").
The problem was, that if the tables have lots of columns the layout shows a strange behaviour (The tables grow to maximum).

So I've tried to reproduce this behaviour with a simple example
(attached as test.js).
There is a window (height "100%") attached to a document.
Within this window a table is placed  (height "100%").

This table grows and grows up to the maximum of columns and pushes the
bottom of window out of the browser window.

I found out that I can prevent this behaviour if I set the minHeight
property of the window, but I don't understand why.
It suffices to set the property to null.
Is this a bug? I'm using v0.7.

Thanks Ulrich

Sorry for the txt-ending (our server accepts no .js, and sourgeforge no .zip)


/* ************************************************************************

   Copyright:

   License:

   Authors:

************************************************************************ */

/* ************************************************************************

#resource(image:image)

************************************************************************ */

/**
 * Your custom application
 */
qx.Class.define("test.test",
{
  extend : qx.application.Gui,


  /*
  *****************************************************************************
     MEMBERS
  *****************************************************************************
  */

  members :
  {
    /**
     * TODOC
     *
     * @type member
     * @param e {Event} TODOC
     * @return {void}
     */
    main : function(e)
    {
      this.base(arguments);

      var wndTest = new qx.ui.window.Window;

            wndTest.set({
              showMinimize    : true,
              showMaximize    : true,
              allowClose      : true,
              resizable       : false,
              moveable        : true,
              width           : "auto",
              height          : "100%"/*,
              minHeight       : null*/
            });


            // table model
            var tableModel = new qx.ui.table.model.Simple();
            tableModel.setColumns([ "ID", "A number", "A date", "Boolean test" 
]);
            var rowData = [];
            var now = new Date().getTime();
            var dateRange = 400 * 24 * 60 * 60 * 1000; // 400 days
            for (var row = 0; row < 100; row++) {
              var date = new Date(now + Math.random() * dateRange - dateRange / 
2);
              rowData.push([ row, Math.random() * 10000, date, (Math.random() > 
0.5) ]);
            }
            tableModel.setData(rowData);
            tableModel.setColumnEditable(1, true);
            tableModel.setColumnEditable(2, true);

            // table
            var table = new qx.ui.table.Table(tableModel);
            with (table) {
              set({ left:0, top:0, height : "100%", width : "100%" });
              setMetaColumnCounts([1, -1]);
              
getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION);
              getTableColumnModel().setDataCellRenderer(3, new 
qx.ui.table.cellrenderer.Boolean());
            };

            wndTest.add(table);

      wndTest.addToDocument();
      wndTest.open();
    },


    /**
     * TODOC
     *
     * @type member
     * @param e {Event} TODOC
     * @return {void}
     */
    close : function(e)
    {
      this.base(arguments);

      // Prompt user
      // return "qooxdoo application: Do you really want to close the 
application?";
    },


    /**
     * TODOC
     *
     * @type member
     * @param e {Event} TODOC
     * @return {void}
     */
    terminate : function(e) {
      this.base(arguments);
    }
  },




  /*
  *****************************************************************************
     SETTINGS
  *****************************************************************************
  */

  settings : {
    "test.resourceUri" : "./resource"
  }
});
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to