2012-02-08 9 views
0

headers.Iはアコーディオン項目のツリーパネルを使用していますExtJSのアコーディオンアイテムのツールチップを追加する方法がありますです。Extjs4表示ツールチップ

私のアコーディオンパネル

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 
    }) 
     ], 
}); 

答えて

2

あなたは、例えば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/

+0

ありがとうロロ、それは仕方がない – jeewiya

関連する問題