【问题标题】:How to change tooltip background in extjs3.4如何在 extjs3.4 中更改工具提示背景
【发布时间】:2013-07-03 18:37:29
【问题描述】:

我正在使用 metadata(metadata.attr="ext:qtip='tooltip'") 向网格动态添加工具提示 在 extjs 3.4 中。

但我想将此工具提示添加到网格中的每个单元格并尝试以下方式而不是使用上述方法

 function setToolTip(val, metadata) {
        new Ext.ToolTip({
                target: 'company',
                html: 'Click the X to close me',
                title: 'My Tip Title',
                autoHide: false,
                closable: true,
                draggable:true
            });

        return val; 
    }
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {
                id       :'company',
                header   : 'Company', 
                width    : 160, 
                sortable : true, 
                renderer : setToolTip,
                dataIndex: 'company'
            }
        ],
        stripeRows: true,
        autoExpandColumn: 'company',
        renderTo: document.body,
        height: 350,
        width: 600,
        title: 'Array Grid',
        // config options for stateful behavior
        stateful: true,
        stateId: 'grid'
    });

对于目标,我给出了我在网格中使用的 Ext.grid.Column 的 ID。 但即使我是页面开头的这一行,我也没有得到工具提示

Ext.QuickTips.init();

【问题讨论】:

  • 不幸的是,这里不是real question。到目前为止,您尝试过什么吗?请先展示您的努力,以便其他人可以帮助您。另外,请阅读FAQHow to Ask

标签: tooltip background-image background-color extjs3


【解决方案1】:

尝试使用bodyStyle,你可以在这里找到http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.ToolTip-cfg-bodyStyle

【讨论】:

    猜你喜欢
    • 2015-06-28
    • 1970-01-01
    • 2020-06-10
    • 1970-01-01
    • 1970-01-01
    • 2015-03-31
    • 1970-01-01
    • 2011-11-25
    • 1970-01-01
    相关资源
    最近更新 更多