PDA

View Full Version : Sencha Touch 0.97 => Ext.layout.AbsoluteLayout?



dimitar71
21 Oct 2010, 6:06 PM
I need to distribute children in a container absolutely (top and left values).

Are there any plans to add Ext.layout.AbsoluteLayout or is there any common-sense way I can make this happen?

dimitar71
21 Oct 2010, 7:17 PM
Never mind, found a way, although not very elegant. It's kinda tricky the way positioning system works. For example if p.setPosition(130, 130) is called before p.show(), top/left values won't be used and default (0, 0) is passed. Anyway.


Ext.setup({
icon:"icon.png",
glossOnIcon:true,
onReady:function() {
var p = new Ext.Panel({
id:"p",
width:100,
height:100,
floating:true
});
p.show();
p.setPosition(130, 130);

var container = new Ext.Panel({
fullscreen:true
});
container.add(p);
}
});