【问题标题】:ExtJS Button Style Toolbar [duplicate]ExtJS 按钮样式工具栏 [重复]
【发布时间】:2012-01-18 15:46:31
【问题描述】:

我想知道是否可以将按钮放入面板的工具栏中,但让它保留按钮的外观,就好像它只是在普通面板中一样。

例如,我希望按钮看起来像这样:

但是,它看起来像这样:

非常感谢!

编辑

创建工具栏的代码:

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 类。

【问题讨论】:

  • 请包含您尝试过的代码..

标签: button extjs styles toolbar


【解决方案1】:

我遇到了完全相同的问题。为了解决,我将它传递给按钮:

cls:'x-btn-default-small'

【讨论】:

  • 滚动按钮后,类不会被删除吗?
  • 这不适用于 IE8
【解决方案2】:

添加这个

ctCls: 'x-btn-over'

to button config 在 Ext 2.2.1 中为我解决了这个问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多