PDA

View Full Version : [CLOSED] layout dock:top is not work...



leebyeungok
21 Oct 2011, 5:22 PM
Ext.application({
name:'HBOX',
launch:function(){


var mainPanel = Ext.create('Ext.Container', {
fullscreen: true,

layout: 'hbox',
items: [
{
xtype:'panel',
dock:'top',
html:'dock top panel',
height: 100,
style:' background: #FF00FF',
},
{
xtype:'panel',
html:'first',
flex:1,
style:'background:#FF0000',
},
{
xtype:'panel',
html:'second panel',
flex:2,
style:'background:#00FF00',
},
{
xtype:'panel',
html:'third panel',
flex:2,
style:' background: #0000FF',
}
]
});

//now we add the first panel inside the second

}
});

dock:'top' is not work....!!
28795

SunboX
22 Oct 2011, 1:46 AM
There´s no config parameter called "dock", only "docked":
http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/docs/#!/api/Ext.Panel-cfg-docked

greetings Sunny

PS: Wrap your code inside [ CODE ] ... it´s better readable ;o)

leebyeungok
22 Oct 2011, 3:23 AM
your layout code is... this...

but thanks a lot...


Using Layouts in Sencha Touch 2

Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', items: [ { dock: 'top', xtype: 'panel', height: 20, html: 'This is docked to the top' }, { xtype: 'panel', html: 'message list', flex: 1 }, { xtype: 'panel', html: 'message preview', flex: 2 } ]});

Jamie Avins
31 Oct 2011, 11:00 AM
Yes, this is a bug we are aware of. The docs got ahead of the code.