我试图在 ExtJS 面板中垂直居中一些文本。我有这个作为一个kludge,但我想知道正确的方法?
var instructions = new Ext.Panel(
{
height: 40,
items: [
{
html: '<br>To access an Aircraft Profile, please highlight a row in the table and select the N-Number hyperlink displayed in the summary below the table'
}]
});
这是我最终使用以下答案实现的:
var instructions = new Ext.Panel(
{
height: 40,
layout: 'hbox',
layoutConfig: {
align: 'middle'
},
items: [
{
xtype: 'displayfield',
value: 'To access an Aircraft Profile, please highlight a row in the table and select the N-Number hyperlink displayed in the summary below the table'
}]
});