PDA

View Full Version : Missing rounded corners when hiding textfield in fieldset



spaolini
7 Jul 2011, 7:30 AM
I have a fieldset that contains a checkboxfield and a textfield in that order. When the user checks the checkboxfield I want to hide the textfield. I do this using the setVisible() method of the textfield, and it works perfectly except for one problem ... when the textfield is hidden and the bottom of the fieldset that contains the items is now missing the rounded corners. Does anyone know how I can fix this?

Here is a sample of the code I have ... I removed a bunch of other fields and fieldsets to make it more readable:


bst.views.TestCard = Ext.extend(Ext.form.FormPanel, {

initComponent: function() {

var qFields = {
defaults: {
labelAlign: 'left',
labelWidth: '80%'
},
items: [{
xtype : 'checkboxfield',
label : 'Is mailing address?',
id : 'mailingAddress'
},{
xtype : 'textfield',
label : 'If no, zip',
useClearIcon : true,
value : '',
id : 'zip'
}]
};

var qForm = {
id: 'addressForm',
items: [{
xtype: 'fieldset',
title: 'Address Information',
instructions: 'Please enter address information above.',
items: [qFields]
}]
};

Ext.apply(this, {
fullscreen: true,
scroll: 'vertical',
items: [qForm]
});

bst.views.TestCard.superclass.initComponent.apply(this, arguments);

Ext.getCmp('mailingAddress').on({
scope : this,
check : this.onAddressChange,
uncheck : this.onAddressChange
});
},

onAddressChange: function(checkBoxField){
Ext.getCmp('zip').setVisible(!checkBoxField.isChecked());
Ext.getCmp('addressForm').doLayout();
}
});

Ext.reg('testCard', bst.views.TestCard);

dlouwers
2 Aug 2011, 4:51 AM
Same issue. Followed the form tutorial that came up with validation component. I only get rounded corners top left. Rest are gone.