ExtJS的按钮样式工具栏 [英] ExtJS Button Style Toolbar
问题描述
我不知道是否有可能把一个按钮到面板的工具栏但它保留了按钮的外观,就好像它只是在一个普通的面板。
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:
太感谢了!
修改
code创建工具栏:
Code to create toolbar:
xtype: 'toolbar',
items:
[
{
xtype: 'button',
text: 'Select bounding box on map',
id: 'bbBoxButton',
icon: 'img/cross_cursor.gif',
listeners: {
click: function(){
polygonControl.activate();
}
}
}
]
code创建普通按钮:
Code to create regular button:
{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.
推荐答案
此链接似乎回答正是我想要的。
This link seemed to answer exactly what i wanted.
看zombeerose的3.0解决方案的回应。
Look at zombeerose's response for 3.0 solution.
http://www.sencha.com/forum/ showthread.php?57130-工具栏按钮式
这篇关于ExtJS的按钮样式工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!