【发布时间】:2013-12-04 14:42:31
【问题描述】:
问题很简单。 我有一个主屏幕,北部地区必须显示两个文本字段和一个按钮以使用户能够连接。
我有这个代码。
Ext.create('Ext.container.Viewport', {
layout: 'anchor',
id: 'homescreen',
items: [
{
layout: 'border',
border: false,
height: 160,
anchor: '100%',
items: [
{
region: 'west',
// some codes here
},
{
xtype: 'container',
width: '70%',
region: 'east',
layout:
{
type: 'table',
columns: 1,
tdAttrs:
{
style: 'padding: 5px 15px 5px 15px;',
align: 'middle',
},
defaults:
{
width: 150,
textAlign: 'right'
},
},
items: [
{
xtype: 'textfield',
//fieldLabel: 'login',
labelWidth:50,
emptyText: 'Utilisateur',
margin: '18 0 0 0',
},
{
xtype: 'textfield',
//fieldLabel: 'mot de passe',
labelWidth:100,
emptyText: 'Mot de passe',
},
{
xtype: 'button',
html: 'Connexion',
scale: 'large',
},
]
}]
},
如您所见,所有文本字段和按钮都垂直对齐在一列上。
但问题是它们显示在容器的左侧。如何在右侧显示它们(不使用 css)?
=
水平对齐。
【问题讨论】: