直接把组件放在window中,就会出现背景变成白色问题
我觉得group放到FormPanel(这里加个frame:true)里..再把formPanel放到window里就行了,当然也可以修改样式。
问题链接:[url]http://www.iteye.com/problems/21365[/url]
我的代码:
我觉得group放到FormPanel(这里加个frame:true)里..再把formPanel放到window里就行了,当然也可以修改样式。
问题链接:[url]http://www.iteye.com/problems/21365[/url]
我的代码:
Ext.onReady(function(){
var checkGroup = {
xtype: 'checkboxgroup',
allowBlank: false,
items: [
{boxLabel: 'Item 1', name: 'cb-auto-1'},
{boxLabel: 'Item 2', name: 'cb-auto-2', checked: true},
{boxLabel: 'Item 3', name: 'cb-auto-3'},
{boxLabel: 'Item 4', name: 'cb-auto-4'},
{boxLabel: 'Item 5', name: 'cb-auto-5'}
]
};
var formPanel =new Ext.form.FormPanel({
frame:true,
items:[checkGroup
]
});
var fp = new Ext.Window({
frame: true,
labelWidth: 110,
width: 600,
height:200,
items: [
formPanel
]
});
fp.show();
})
本文介绍了一种解决ExtJS中窗体背景变为白色的方法。通过将组件放置于带有frame:true属性的FormPanel中,并进一步嵌套到Window内,可以避免背景色异常问题。此外,还提供了一个具体的代码示例。
1万+

被折叠的 条评论
为什么被折叠?



