ExtJS按钮样式工具栏

9
我想知道是否有可能将按钮放入面板的工具栏中,但使其保留按钮的外观,就像它只是在普通面板中一样。
例如,我希望按钮看起来像这样: Button Style 然而,它看起来像这样: Toolbar Button 非常感谢!
编辑
创建工具栏的代码:
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类。


请包含您所尝试的代码。 - dku.rajkumar
2个回答

6

我曾经遇到过完全相同的问题。为了解决这个问题,我将以下内容传递给按钮:

cls:'x-btn-default-small'

一旦您滑过按钮,类别不会被移除吗? - reergymerej
这在IE8中不起作用。 - Oliver Watkins

2

加上这个

ctCls: 'x-btn-over'

在Ext 2.2.1中,通过按钮配置解决了我的问题。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接