如何在ExtJS中使面板中的文本垂直居中?
我试图在ExtJS面板中垂直居中一些文本。我把这当作一个难题,但我想知道正确的方法如何在ExtJS中使面板中的文本垂直居中?,extjs,extjs3,Extjs,Extjs3,我试图在ExtJS面板中垂直居中一些文本。我把这当作一个难题,但我想知道正确的方法 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-
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'
}]
});
我认为您应该能够将面板布局设置为“hbox”,并使用pack“center”,或者使用hbox布局和pack center在面板内嵌套一个容器
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'
}]
});