自动滚屏不适用于vbox布局 [英] autoscroll does not work with vbox layout
本文介绍了自动滚屏不适用于vbox布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将表单对齐到中心,所以我使用了vbox布局,在我使用它之后,自动滚屏没有像以前那样工作,代码如下:
I need align the formpanels to the center, so I used the vbox layout, and after I used it the autoscroll did not work as before, the code is as below:
Usr.VWPanel = Ext.extend(Ext.Panel, {
id: null,
rid: null,
closable: true,
autoScroll: true,
buttonAlign: 'center',
layout: {
type:'vbox',
padding:'5',
pack:'center',
align:'center'
},
initComponent: function () {
Ext.apply(this, {
items: [
{
xtype: 'spacer',
height: 16
},
{
xtype: 'usr.usrform',
itemId: 'usr.vwpain.usrformt',
width: 600,
height: 500
},
{
xtype:'spacer',
height: 16
},
{
xtype: 'usr.loginform',
itemId: 'usr.vwpain.loginform',
width: 600
},
{
xtype: 'spacer',
height: 16
},
{
xtype: 'usr.subsform',
itemId: 'usr.vwpain.subsform',
width: 600
}],
...
plz建议。
推荐答案
在您的 css
中,您可以将我的面板边距设置为 {0 auto}
将把窗口中的 My Panel 居中。这意味着您不需要窗口的特殊布局配置。
in your css
you can set your My Panel margins to {0 auto}
which will center the My Panel inside the window. This means you don't need a special layout config for your window.
这篇关于自动滚屏不适用于vbox布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文