views:

12

answers:

1

Here's my simple code; I'm expecting my atom1 widget (row:0, column:0) to be righ aligned; but can't get it! Any suggestions?

var layout = new qx.ui.layout.Grid();
layout.setRowFlex(0, 1); // make row 0 flexible
layout.setColumnWidth(1, 200); // set with of column 1 to 200 pixel
var container = new qx.ui.container.Composite(layout);
this.getRoot().add(container, {left:200, top:200});
var atom1 = new qx.ui.basic.Atom("Icon Right1", "").set({alignX:'right', alignY:'middle'});
var atom2 = new qx.ui.basic.Atom("Icon Right2", "");
var button1 = new qx.ui.form.Button("First Button", "test/test.png");
container.add(atom1, {row: 0, column: 0});
container.add(atom2, {row: 0, column: 1});
container.add(button1, {row: 1, column: 0});
+3  A: 

you have to prevent the atom from growing or it will just fill the cell and have no room to move.

add allowGrowX: false ...

see the qooxdoo playground for an example

Tobi Oetiker