PDA

View Full Version : Size problem for form elements in IE



kronox
16 Nov 2007, 11:23 AM
Ok, so I seem to be posting for some solutions a lot lately .. this one problem I am having has been bugging me for a few days now, and I cannot find where or how the error is happening. I am sure that someone else has had this exact same error and has possibly found a solution.

My problem is in IE, I am displaying a Panel with a form in it, the form elements within it tend to be different sizes each time I show the panel.

Sometimes it is displayed correctly, and other times the textfields fill up the entire page.

http://www.mk2solutions.com/error.gif

tryanDLS
16 Nov 2007, 12:17 PM
Can you post some example code?

kronox
16 Nov 2007, 12:25 PM
Here is the code I am using to create the window.


newClient = new Ext.Window({
autoShow: true,
title: 'Add a new client',
closeAction: 'hide',
width: 300,
plain: false,
modal: true,
bodyStyle: 'padding: 2px',
items: new Ext.FormPanel({
cid: 'acf',
bodyStyle: 'padding: 3px',
frame: false,
labelWidth: 100,
autoWidth: true,
defaults: {height: 20},
items: [{
xtype: 'numberfield',
fieldLabel: 'Id',
name: 'id',
value: clientStore.getCount() + 1,
disabled: true
},{
xtype: 'textfield',
fieldLabel: 'Name',
name: 'name'
},{
xtype: 'textfield',
fieldLabel: 'Company',
name: 'company'
},{
xtype: 'textfield',
fieldLabel: 'Website',
name: 'url'
},{
xtype: 'textfield',
fieldLabel: 'Contact',
name: 'contact'
},{
xtype: 'textfield',
fieldLabel: 'Address',
name: 'address'
},{
xtype: 'textfield',
fieldLabel: 'City',
name: 'city'
},{
xtype: 'textfield',
fieldLabel: 'Province',
name: 'province'
},{
xtype: 'textfield',
fieldLabel: 'Country',
name: 'country'
},{
xtype: 'textfield',
fieldLabel: 'Postal Code',
name: 'postalCode'
},{
xtype: 'textfield',
fieldLabel: 'Phone #',
name: 'phone'
},{
xtype: 'textfield',
fieldLabel: 'Cell #',
name: 'cell'
},{
xtype: 'textfield',
fieldLabel: 'Fax #',
name: 'fax'
},{
xtype: 'textfield',
fieldLabel: 'Email Address',
name: 'email'
},{
xtype: 'datefield',
fieldLabel: 'Registered',
name: 'registered',
value: new Date()
}
]
}),
buttons: [{
text: 'Add Client',
handler: function() { addClient(newClient); newClient.hide(); }
},{
text: 'Cancel',
handler: function() { newClient.hide(); }
}]
});