本文介绍了ExtJS 按钮样式工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否可以将按钮放入面板的工具栏中,但让它保留按钮的外观,就好像它只是在普通面板中一样.
I was wondering if it is possible to put a button into a panel's toolbar but have it retain the look of a button as if it was just in a plain panel.
例如,我希望按钮看起来像这样:
For example, i want the button to look like this:
然而,它看起来像这样:
However, it looks like this:
非常感谢!
编辑
创建工具栏的代码:
xtype: 'toolbar',
items:
[
{
xtype: 'button',
text: 'Select bounding box on map',
id: 'bbBoxButton',
icon: 'img/cross_cursor.gif',
listeners: {
click: function(){
polygonControl.activate();
}
}
}
]
创建常规按钮的代码:
{xtype: 'button', id: 'bboxButton', text: 'Select bounding box on map', icon: 'img/cross_cursor.gif', listeners: {click: function(){polygonControl.activate()}}}
我相信我必须为按钮使用 cls 配置,但我似乎找不到合适的 css 类.
I believe I have to use the cls config for the button, but i cannot seem to find the appropriate css class.
推荐答案
我遇到了完全相同的问题.为了解决这个问题,我将其传递给按钮:
I had the exact same issue. To solve, I pass this into the button:
cls:'x-btn-default-small'
这篇关于ExtJS 按钮样式工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论