ExtJS 按钮样式工具栏
我想知道是否可以将按钮放入面板的工具栏中,但保留按钮的外观,就好像它只是在普通面板中一样。
例如,我希望按钮看起来像这样:
但是,它看起来像这样:
非常感谢!
编辑
创建工具栏的代码:
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 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:
Thanks so much!
EDIT
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 to create regular button:
{xtype: 'button', id: 'bboxButton', text: 'Select bounding box on map', icon: 'img/cross_cursor.gif', listeners: {click: function(){polygonControl.activate()}}}
I believe I have to use the cls config for the button, but i cannot seem to find the appropriate css class.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有完全相同的问题。为了解决这个问题,我将其传递到按钮中:
I had the exact same issue. To solve, I pass this into the button:
将其添加
到按钮配置中解决了我在 Ext 2.2.1 中的问题
Adding this
to button config solved the issue for me in Ext 2.2.1