PDA

View Full Version : tooltip on mouseover grid record



nadeemshafi9
14 May 2009, 4:39 AM
Hi Guys

How would one theoreticaly go abouts getting a tooltip like the ... when you pass your mouse over a record in the grid, my record when double clicked opens up a new window so i need to indicate this. Is it as easy as a simple config tooltip .

Thanks

N

Animal
14 May 2009, 4:50 AM
event:

dblclick

nadeemshafi9
14 May 2009, 4:58 AM
i dont think i explained properly, when i pass my mouse over the row i whant a tooltip to show like an alt, i have used tooltips before but i am unsure of there dynamics and ways in which you can implament them, can you give me a pseudo please, thanks

Animal
14 May 2009, 5:04 AM
So what was that all about double click then???

http://extjs.com/deploy/ext-3.0-rc1.1/docs/?class=Ext.ToolTip&member=delegate

pongz79
14 May 2009, 5:32 AM
This is how i do it:


YOUR_GRID_REFERENCE.on('render', function() {
YOUR_GRID_REFERENCE.tip = new Ext.ToolTip({
view: YOUR_GRID_REFERENCE.getView(),
target: YOUR_GRID_REFERENCE.getView().mainBody,
delegate: '.x-grid3-row',
trackMouse: true,
renderTo: document.body,
listeners: {
beforeshow: function updateTipBody(tip) {
tip.body.dom.innerHTML = "YOUR TOOLTIP TEXT...";
}
}
});
});


Best regards

Animal
14 May 2009, 5:48 AM
Pretty much what's in the docs I just linked to then?

extjs3user
13 Jul 2009, 10:45 PM
I have created a panel


northPanel = new Ext.Panel({
region: 'north'
, id: 'northPanelId'
, border: false
, frame: false
, loadMask: true
, bodyBorder: false
, collapsible: true
, collapseFirst: true
});


Am registering tooltip for expand/collapse button of panel with the following code



northPanel.on("render", function(p) {
p.tip = new Ext.ToolTip({
target: p.el,
delegate: '.x-tool-expand-north ',
trackMouse: true,
html: 'test'
});
});


but the tooltip is not shown.

please help me.

Animal
13 Jul 2009, 11:26 PM
What's with that override? What's that all for?

Why don't you just create a Tooltip for the collapse tool Element, and that's it!?

http://extjs.com/deploy/dev/docs/?class=Ext.Panel&member=tools

extjs3user
14 Jul 2009, 3:28 AM
Without using tools option in panel cant we have tool tip for expand/collapse button for a panel.

Animal
14 Jul 2009, 3:31 AM
They are tools!

nadeemshafi9
15 Jul 2009, 2:37 AM
thanks guys i was prety amature when i posted this but still havent got to using the tooltips lol, i think i have somwhere.