I want to have menu in a button as drop-down without the key "text" in ext js 4. I have an array with me with the required field to be shown in button. And I am associating this array in the menu option programatically. But this ar开发者_如何学运维ray does not have "text" as its column. Please help. Regards, Ranjeet Kanth
Ext.create('Ext.button.Button', {
x: 5,
y: 5,
text: 'Add Language',
showText: true,
width: 120,
menu : menu1 });
var menu1 = {
items: [{entryName:'English'},{entryName:'English(US)'}]
};
I think you're using the wrong component... you should be using a split button:
Ext.create('Ext.button.split', { ... });
精彩评论