I have some strange behaviour here:

1. odd padding -> textfield glues with the above cell but not label

var mobilePhoneTF = this.__mobilePhoneTF = new 
qx.ui.form.TextField(this.tr("Mobile phone number"));
mobilePhoneTF.setRequired(true);
mobilePhoneTF.setWidth(100);
mobilePhoneTF.setAllowGrowX(false);

var mobilePhoneL = this.__mobilePhoneL = new qx.ui.basic.Label(this.tr("Mobile 
phone number"));
mobilePhoneL.setBuddy(mobilePhoneTF);
mobilePhoneL.setAlignY("middle");


// Document is the application root
var doc = this.getRoot();

var layoutG = new qx.ui.layout.Grid(1, 2);

doc.setLayout(layoutG);

this.__mobilePhoneL.setPaddingTop(10);
this.__mobilePhoneTF.setPaddingTop(10);

doc.add(this.__mobilePhoneL, {row: 0, column: 0});
doc.add(this.__mobilePhoneTF, {row: 0, column: 1});

2. odd margin -> setAlignY("middle") does not work -> label middled including 
the padding

var mobilePhoneTF = this.__mobilePhoneTF = new 
qx.ui.form.TextField(this.tr("Mobile phone number"));
mobilePhoneTF.setRequired(true);
mobilePhoneTF.setWidth(100);
mobilePhoneTF.setAllowGrowX(false);

var mobilePhoneL = this.__mobilePhoneL = new qx.ui.basic.Label(this.tr("Mobile 
phone number"));
mobilePhoneL.setBuddy(mobilePhoneTF);
mobilePhoneL.setAlignY("middle");


// Document is the application root
var doc = this.getRoot();

var layoutG = new qx.ui.layout.Grid(1, 2);

doc.setLayout(layoutG);

this.__mobilePhoneL.setMarginTop(10);
this.__mobilePhoneTF.setMarginTop(10);

doc.add(this.__mobilePhoneL, {row: 0, column: 0});
doc.add(this.__mobilePhoneTF, {row: 0, column: 1});

3. correct behaviour = a mix solves the problem

var mobilePhoneTF = this.__mobilePhoneTF = new 
qx.ui.form.TextField(this.tr("Mobile phone number"));
mobilePhoneTF.setRequired(true);
mobilePhoneTF.setWidth(100);
mobilePhoneTF.setAllowGrowX(false);

var mobilePhoneL = this.__mobilePhoneL = new qx.ui.basic.Label(this.tr("Mobile 
phone number"));
mobilePhoneL.setBuddy(mobilePhoneTF);
mobilePhoneL.setAlignY("middle");


// Document is the application root
var doc = this.getRoot();

var layoutG = new qx.ui.layout.Grid(1, 2);

doc.setLayout(layoutG);

this.__mobilePhoneL.setPaddingTop(10);
this.__mobilePhoneTF.setMarginTop(10);

doc.add(this.__mobilePhoneL, {row: 0, column: 0});
doc.add(this.__mobilePhoneTF, {row: 0, column: 1});

-------------

Anyone who can tell if it is a normal behaviour or a bug? To me it seems to be 
strange calculations.

Stefan
                                          
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to