开发者

how to add menu in a button

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', { ... });

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜