I want to add a tooltip on a disabled combobox which should show all the list values of the combobox and also selected value should be in bold in the tooltip in EXTJS.
Can someone please help me with this
You did not leave a lot of information.
In modern you might want to listen to the painted event, in classic the render event and fill your tooltip.
Just be aware, that if you have a data-binding for the store, the data might not be available at the time.
Further if it is not filled with static data, you have to go for the load event of the store.
Here is an example for modern:
items: [{
xtype: 'combobox',
label: 'Choose State',
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
disabled: true,
store: [
{abbr: 'AL',name: 'Alabama'},
{abbr: 'AK',name: 'Alaska'},
{abbr: 'AZ',name: 'Arizona'}
],
listeners: {
painted: function() {
let tooltip = '';
data = Ext.Array.pluck(this.getStore().getData().items, 'data');
Ext.Array.each(data,function(set) {
tooltip += set.name + '<br>'
});
this.setTooltip(tooltip);
}
}
}]