PDA

View Full Version : ComboBox Title Property



lenzenc
8 Sep 2011, 4:32 PM
What happened to the "title" property on a ComboBox in ExtJS 4? Is there an alternative?

mitchellsimoens
9 Sep 2011, 5:36 AM
Unfortunately that functionality was not ported over. You can do one of two things as I see it:

The 3.x way was to manually create a child element in the list (code directly from 3.4.0 so you will need to modify to work with 4.x):


if(this.title){
this.header = this.list.createChild({cls:cls+'-hd', html: this.title});
this.assetHeight += this.header.getHeight();
}

Or you can hack up the current ComboBox in 4.x to show a Panel with a docked toolbar and then the BoundList as it's child. You would just need to look at the createPicker method in ComboBox. That's where it creates the BoundList.