PDA

View Full Version : show/hide overlap



Gamer
10 Mar 2011, 7:56 AM
I am trying to show/hide a textfield based on a selection being made in a combobox. The problem is that the textfield is appearing on top of, instead of next to the combobox. I have it in an hbox layout if that makes a difference. Any help is appreciated.

this.textcombo = new Ext.ux.TextOperatorsCombo({

xtype: 'textoperatorscombo',
id:'textcombo',
name: 'textcombo',
ref: 'textcombo',
allowBlank: false,
flex: .5,
listeners: {
select: function(combo, value) {
Ext.getCmp('txtfield').enable();
Ext.getCmp('txtfield').show();
},
clear : function(combo, value) {
Ext.getCmp('txtfield').setValue();
Ext.getCmp('txtfield').disable();
Ext.getCmp('txtfield').hide();

}
}

})

this.txtfield = new Ext.form.TextField({
xtype: 'textfield',
id:'txtfield',
name: 'txtfield',
ref: 'txtfield',
allowBlank: false,
flex: .5,
hidden:true


}),