PDA

View Full Version : column layout issue in FormPanel



lk_nick
24 Dec 2013, 12:00 AM
I create a formpanel within column layout, but it is not trim at the end of line. There is a gap in the back of the last column.

As shown in Figure, the gap appeared in the back of "column4".
47349
I know, it will not show the strange gap when the border is false. But unfortunately,I need the border.

So, who can help me? Thank you!

My code is :


new Ext.form.FormPanel({
border : false,
defaults : {
defaultType : 'displayfield',
border : true,
frame : true,
layout : 'form'
},
layout : 'column',
items : [{
columnWidth : .25,
items : {
fieldLabel : 'column1',
name : 'column1'
}
},{
columnWidth : .25,
items : {
fieldLabel : 'column2',
name : 'column2'
}
},{
columnWidth : .25,
items : {
fieldLabel : 'column3',
name : 'column3'
}
}, {
columnWidth : .25,
items : {
fieldLabel : 'column4',
name : 'column4'
}
}, {
columnWidth : 1,
items : {
fieldLabel : 'column5',
name : 'column5'
}
}]
});





I have solved the problem. Don't use the property "columnWidth" but "width", For example:


{
width: '100%',
items : {
fieldLabel : 'column5',
name : 'column5'
}
}

slemmon
13 Jan 2014, 12:02 PM
Thanks for sharing your answer with the community!