6
A
回答
4
您的IFrame可以使用边界布局的内容以上或没有布局,像这样:
var viewPort = new Ext.Viewport({
renderTo:'body',
width: 400,
height: 400,
items:[new Ext.Panel({
title: 'hi',
width: 200,
height: 200,
style: 'margin:0 auto;margin-top:100px;'
})]
});
0
喜欢的东西
grid:
region: center;
panel:
layout: border;
css: "padding: 40px"
3
在examples site有一个这样的例子,你可能想看看。
layout:'ux.center',
items: {
title: 'Centered Panel',
widthRatio: 0.75,
html: 'Some content'
}
+0
显然这有副作用http://www.sencha。 ?COM /论坛/ showthread.php 65064-解决 - !!! - ux.center - 不工作 –
1
的另一种方式,不优雅,是垂直框中,然后HBox中布局的cludge但纯ExtJS的和不依赖于UX:
Ext.create('Ext.container.Viewport',{
style: 'background-color: white;',
layout: {
type: 'vbox',
align : 'stretch',
pack : 'start',
},
items: [{
flex: 1,
border: false
},{
height: 200,
border: false,
layout: {
type: 'hbox',
pack: 'start',
align: 'stretch'
},
items: [{
flex: 1,
border: false
},{
html:'Centered Panel',
width: 400
},{
flex: 1,
border: false
}]
},{
flex: 1,
border: false
}]
//items: [login_panel],
});
1
简单地使用:
this.center()
这里的“this”是你想放在中心的对象(比方说网格)。
相关问题
- 1. ASP.net - 中心对齐面板?
- 2. 如何将中心网格对齐
- 3. 如何在页面中心对齐div?
- 4. Extjs网格图标行对齐中心
- 5. 网格视图标题中心对齐
- 6. 如何在网页的中心对齐引导格式
- 7. 对齐引导面板中心的网页
- 8. 如何在html/css页面的中心对齐表格
- 9. 对齐页面中心的表格
- 10. 如何对齐页面中心的列?
- 11. 对齐中心对齐的右引导网格
- 12. GWT:如何使网格图像对齐中心
- 13. 如何对齐要在网格中对齐的div块?
- 14. 中心在Java框架/面板中对齐矩形
- 15. jsf 1.2中的面板网格对齐方式
- 16. 将JLabel与网格包布局中的面板左侧对齐
- 17. 在面板上以毫米为单位对齐网格?
- 18. 在jsplumb中对齐网格
- 19. 在网格中对齐
- 20. 在QTableWidget中对齐单元格中心?
- 21. 如何对齐中心highcharts
- 22. 在一个中心垂直对齐项目 - Sencha面板
- 23. 表对齐中心不对齐中心
- 24. 如何对齐页面中心中许多面板中仅两个面板的分组文本?
- 25. 如何在表单面板中添加网格面板?
- 26. 如何在响应式网站中对齐中心的div
- 27. 如何对齐表格中的单元格中心
- 28. 如何在中心对齐UISegment文本
- 29. 如何中心对齐IMG在div?
- 30. 如何在虾中心对齐表?
谢谢Skym。还有一个问题:http://stackoverflow.com/questions/6594067/align-components-in-the-center-in-a-panel-ext-js – Ajan