javascript - How to set Ext.button.Split not to show arrow when menu is empty? - Stack Overflow

I have Ext.button.Split, for example: Ext.create('Ext.button.Split', {renderTo: Ext.getBody()

I have Ext.button.Split, for example:

Ext.create('Ext.button.Split', {
    renderTo: Ext.getBody(),
    text: 'Example',
    handler: function() {
        alert("Click!");
    }
});

Right now it does not have any menu items. I want to set the button not to show arrow if there are no items. How ? I use EXTJS 4.1 version.

I have Ext.button.Split, for example:

Ext.create('Ext.button.Split', {
    renderTo: Ext.getBody(),
    text: 'Example',
    handler: function() {
        alert("Click!");
    }
});

Right now it does not have any menu items. I want to set the button not to show arrow if there are no items. How ? I use EXTJS 4.1 version.

Share Improve this question asked Nov 26, 2012 at 23:01 DejoDejo 2,1463 gold badges26 silver badges40 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

You can set split: false to hide arrow. You can also use Ext.button.Button instead of Ext.button.Split - when menu is assigned, arrow shows.

Example: http://jsfiddle/AUE6J/

I had a similar issue with ExtJS 6.0.1.

Once the splitbutton is rendered (at least into some panels like an action widget in a grid column), simply setting the property:

button.arrowVisible = false; 

...will not work. You must do this:

button.setConfig('arrowVisible', false); 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745463067a4628796.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信