PDA

View Full Version : How to make Ext.Panel center of Screen?



edwardking
7 Jul 2010, 7:20 PM
I want to make Ext.Panel center in the screen,how to do it? Thanks

<script>
Ext.onReady(function(){
panel3=new Ext.Panel({
title:'Panel 3',
width:200,
height:100
});

var viewport=new Ext.Viewport({
layout:'absolute',
items:[panel3]
});
});
</script>
<body>
<div/>
</body>

Animal
7 Jul 2010, 9:15 PM
Viewport:

layout: {
type: 'vbox',
align: 'center',
pack: 'center'
}