View Full Version : extjs tip set closeable

16 Oct 2013, 6:50 AM
I create one instance of Ext.tip.Tip.So when I click on some point then will appears a tip and I'm setting a closable config. But when I click on another field tip doesnt set new closeable value? How can I set runtime this value? Here is a part of code:

var customTip = new Ext.tip.Tip({ minWidth: 120, listeners: { beforehide : function(tip) { if (tip.body != null) { tip.body.un('mouseenter', window.tipMouseEnter, window); } } }});var customTipShowTask = new Ext.util.DelayedTask({});var currentWindow = window;function showCustomTip(event, html, closable, delayed) { if (!(event instanceof Ext.EventObjectImpl)) { event = new Ext.EventObjectImpl(event); } if (delayed == null || delayed) { customTipShowTask.delay(500, proceedToShowCustomTip, window, [event, html, closable, delayed]); //currentWindow.customTip.update(html); } else { proceedToShowCustomTip(event, html, closable, delayed); }}function proceedToShowCustomTip(event, html, closable, delayed) { customTipShowTask.cancel(); currentWindow.customTip.hide(); currentWindow.customTip.update(''); if (closable != null) { customTip.closable = closable; currentWindow.customTip.closable = closable; } var xy = getTipXY(event); currentWindow.customTip.update(html); currentWindow.customTip.showAt(xy); if (delayed != null && delayed) { currentWindow.customTip.body.on('mouseenter', window.tipMouseEnter, window); }}

How to change the closable?

17 Oct 2013, 9:28 PM
Try to configure closable in the time of creating a tip instance.