PDA

View Full Version : How to get rid of horizontal scrollbar in FormPanel



Sergii
8 Jul 2010, 8:19 AM
Hi!

In the FormPanel comes up a horisontal scrollbar. All Fields in the form are mandatory so right to
each field a small icon appears to indicate that. Changing the Window size did not lead to any success,
as well as making the field width smaller (i.e.columnWidth: 0,9). As I need a vertical scrollbar such sollution as
autoScroll: false does not fit me.

Question:
1) How to get rid of horizontal scrollbar?
2) It is due to red icons to the right of the fields?

thanks in advance, Sergii



ContractsCreateForm = new Ext.FormPanel({
//enctype:'multipart/form-data',
id: 'status-form',
fileUpload: true,
labelAlign: 'right',
buttonAlign: 'center',
labelWidth: 100,
bodyStyle:'padding-left:10px;',
autoScroll: true,
items: [{
layout:'column',
border:false,
items:[{
style: 'padding: 5px;',
columnWidth: 1,
layout: 'form',
border: false,
items: [
ContractNumberField,
ContarctImageField,
FactPlanField,
ContractorNameField,
RevenueCostField
]
}]
}],
buttons: [{
text: 'Save and Close',
handler: createTheContracts
},{
text: 'Cancel',
handler: function(){
resetContractsForm();
ContractsCreateWindow.hide();
}
}]
});

ContractsCreateWindow = new Ext.Window({
id: 'ContractsCreateWindow',
title: 'Creating a New Contracts',
iconCls:'icon-user-add',
closable:true,
width: 600,
height: 400,
plain: true,
layout: 'fit',
items: ContractsCreateForm,
closeAction: 'hide'
});

Animal
8 Jul 2010, 9:44 AM
So in your Window you have a FormPanel which contains a Panel which contains a Panel which contains your input fields.

One question: Why?