Hello again,

I have the following problem with Qooxdoo 0.7.x tables:

I want to pre-load various columns of a table and leave one column empty for
user input. This works fine if I set the respective slots in the rowdata
arrays to '' or null. However, when doing so, the user input into these
cells is not right-aligned (in case of numbers), no matter what I set
UseAutoAlign to on the cell renderer.

If the cells are initialized with some numbers, however, the autoAlign works
as documented.

So the question is: how can I initialize the other columns without
"breaking" the auto-align functionality of the input column.


This can be easily tested with the following code (adopted from demo
browser):


qx.Class.define(
     'Testing.Application', {
     extend: qx.application.Gui,
        members:
     {
         main: function(e) {
             this.base(arguments,e);

             // table model
             var tableModel = new qx.ui.table.model.Simple();
             tableModel.setColumns([ "ID", "A number" ]);
             var rowData = [];
             for (var row = 0; row < 10; row++) {
                 rowData.push([
                               row,
                               // '',
                               // 1.5,
                               null
                              ]);
             }
             tableModel.setData(rowData);
             tableModel.setColumnEditable(1, true);

             // table
             var table = new qx.ui.table.Table(tableModel);
             with (table) {
                 set({ left:20, top:20, width:350, height:300, 
border:"inset-thin" });
                 setMetaColumnCounts([1, -1]);
                 var myRenderer = new qx.ui.table.cellrenderer.Default();
                 myRenderer.setUseAutoAlign(true);
                 getTableColumnModel().setDataCellRenderer(1, myRenderer);
             };

             table.addToDocument();

         }
     }
});


Thanks,
Fritz

-- 
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to