Extjs4 显示手风琴项标题的工具提示

发布于 2025-01-03 09:28:29 字数 713 浏览 3 评论 0原文

有没有办法为 Extjs 手风琴项标题添加工具提示。我正在使用树面板作为手风琴项。

我的手风琴面板

Ext.create('Ext.Panel', {
    region: 'west',
    split: true,
    width: '20%',
    collapsible: true,
    title: 'Accordian',
    iconCls: 'application-side-tree',
    layout: 'accordion',
    items: [
        Ext.create('Ext.tree.Panel', {
        id: 'tree-1',
        store: Store1,
        title: 'First item tree',
        rootVisible: false,
        layout: 'fit',
        draggable: false
    }),
        Ext.create('Ext.tree.Panel', {
        id: 'tree-2',
        store: Store2,
        title: 'Second item tree',
        rootVisible: false,
        layout: 'fit',
        draggable: false
    })
        ],
});

Is there are any way to add tooltip for Extjs accordion item headers.I am using tree panel for accordion item.

My accordian panel

Ext.create('Ext.Panel', {
    region: 'west',
    split: true,
    width: '20%',
    collapsible: true,
    title: 'Accordian',
    iconCls: 'application-side-tree',
    layout: 'accordion',
    items: [
        Ext.create('Ext.tree.Panel', {
        id: 'tree-1',
        store: Store1,
        title: 'First item tree',
        rootVisible: false,
        layout: 'fit',
        draggable: false
    }),
        Ext.create('Ext.tree.Panel', {
        id: 'tree-2',
        store: Store2,
        title: 'Second item tree',
        rootVisible: false,
        layout: 'fit',
        draggable: false
    })
        ],
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别闹i 2025-01-10 09:28:29

您可以使用 QuickTips 例如:

var panel = Ext.create('Ext.panel.Panel', {
    renderTo: Ext.getBody(),
    width: '80%',
    title: 'Accordian',
    layout: 'accordion',
    items: [
        Ext.create('Ext.panel.Panel', {
            title: 'First item tree',
            tooltip: 'tip 1',
            html: 'blah blah'
        }),
        Ext.create('Ext.panel.Panel', {
            title: 'Second item tree',
            tooltip: 'tip 2',
            html: 'blah blah'
        })
    ],
    height: 200
});

panel.items.each(function(p) {
    Ext.create('Ext.tip.ToolTip', {
        target: p.header.id,
        html: p.tooltip
    });
});

Ext.QuickTips.init();

工作示例:http://jsfiddle.net/r4tt5/< /a>

You can use QuickTips for example:

var panel = Ext.create('Ext.panel.Panel', {
    renderTo: Ext.getBody(),
    width: '80%',
    title: 'Accordian',
    layout: 'accordion',
    items: [
        Ext.create('Ext.panel.Panel', {
            title: 'First item tree',
            tooltip: 'tip 1',
            html: 'blah blah'
        }),
        Ext.create('Ext.panel.Panel', {
            title: 'Second item tree',
            tooltip: 'tip 2',
            html: 'blah blah'
        })
    ],
    height: 200
});

panel.items.each(function(p) {
    Ext.create('Ext.tip.ToolTip', {
        target: p.header.id,
        html: p.tooltip
    });
});

Ext.QuickTips.init();

Working sample: http://jsfiddle.net/r4tt5/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文