admin管理员组文章数量:1426104
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 badges2 Answers
Reset to default 4You 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);
本文标签: javascriptHow to set ExtbuttonSplit not to show arrow when menu is emptyStack Overflow
版权声明:本文标题:javascript - How to set Ext.button.Split not to show arrow when menu is empty? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745463067a2659412.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论