PDA

View Full Version : Add tip for x-tool-collapse-X



tinnt
5 Apr 2008, 12:47 AM
:(( I have a trouble, I have a viewport , at the west and east region i have to collapse button
class="x-tool x-tool-collapse-east" , class="x-tool x-tool-collapse-west", the id of them is automatic generate, so if i want to add a tip for them by:
new Ext.ToolTip({
target: 'my_id',
autoHide : true,
html: 'Click here to collapse this pane'
});

This is my trouble way, who can show me how to get the id of them to pass it to my function. . The second way so ugly, i find it byClassName and set the title='Click here to collapse this pane', it so slow. Who can help me. Thank you very much, sorry for my bad English.

Condor
5 Apr 2008, 1:59 AM
Try:


Ext.QuickTips.init();
Ext.QuickTips.register({
target: eastPanel.tools.toggle,
text: 'Click here to collapse this pane'
});
Ext.QuickTips.register({
target: container.getLayout().east.getCollapsedEl().child('.x-tool-expand-east'),
text: 'Click here to expand this pane'
});

tinnt
5 Apr 2008, 12:58 PM
Well done!
Thank you very much.