View Full Version : Tab Panel on deactive / activate does not resize twincombo - (twintriggerfield)

11 Apr 2013, 9:35 AM
I have a twincombo (based on twintriggerfield) that does not "resize" to it's original size when the tab panel is reactivated. This only happens after the twintriggerfield has trigger 1 unhidden after the combo boxes selection. My understanding is that this does it's own resize and this is conflicting with what the tab panel is trying to do.

I have a hack in place on the deactivate and activate of the panel. This taps into the a.lastSize.width and sets it to zero ... which is what would have happened had the twincombo not had the item selection (and the trigger 1 unhidden).

Is there something I can do to one of the events on the twincombo to fix this?

I'm having a bit of a time even stepping through this in the firebug. Resize event and autosize event do not hit when width is set to zero.

Any help is appreciated.

activate: function(object){
var a = Ext.getCmp('twincombo');
deactivate: function(object){
var a = Ext.getCmp('twincombo');
a.lastSize.width = 0;

Ext.ITN.TwinCombo = Ext.extend(Ext.form.ComboBox, {
initComponent: Ext.form.TwinTriggerField.prototype.initComponent,
getTrigger: Ext.form.TwinTriggerField.prototype.getTrigger,
initTrigger: Ext.form.TwinTriggerField.prototype.initTrigger,
onTrigger2Click: Ext.form.ComboBox.prototype.onTriggerClick,
trigger2Class: Ext.form.ComboBox.prototype.triggerClass }});