ExtJS 按钮样式工具栏

编程入门 行业动态 更新时间:2024-10-15 22:22:45
本文介绍了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:关键词]

本文发布于:2023-03-31 18:56:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/811124.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工具栏   样式   按钮   ExtJS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!