View Full Version : BasicDialog's Event
How can I get BasicDialog's "collapsed" and "expanded" Event?
Someone can help me?
Thank...
tryanDLS
7 Jul 2007, 9:05 AM
Please read the API doc - the events are listed. They are hide and show, not collapsed and expanded
I know have "show" and "hide" event
but I need "collapsed" and "expanded" event
thank for your reply...
brian.moeskau
7 Jul 2007, 1:09 PM
There are currently no events for those as Tim mentioned, so if you need to hook into the dialog at that point, you'll have to do so yourself. One approach would be to override the internal click handler and provide your own function. It currently sets it like this (for collapse, expand is similar):
this.collapseBtn.on("click", this.collapseClick, this);
So to implement your own collapse logic, you could do something like this:
Ext.override(Ext.BasicDialog, {
collapseClick : function(){
// do something custom here
}
});
Or if you really need an event, you could use the same concept to override the actual expand/collapse methods directly to fire your own custom event at the end. In that case, you'd want to keep the existing logic, then add extra logic at the end to fire custom events that you define yourself. Look through existing code if you need an example for defining/firing custom events as its done quite commonly throughout Ext.
There are currently no events for those as Tim mentioned, so if you need to hook into the dialog at that point, you'll have to do so yourself. One approach would be to override the internal click handler and provide your own function. It currently sets it like this (for collapse, expand is similar):
this.collapseBtn.on("click", this.collapseClick, this);
So to implement your own collapse logic, you could do something like this:
Ext.override(Ext.BasicDialog, {
collapseClick : function(){
// do something custom here
}
});
Or if you really need an event, you could use the same concept to override the actual expand/collapse methods directly to fire your own custom event at the end. In that case, you'd want to keep the existing logic, then add extra logic at the end to fire custom events that you define yourself. Look through existing code if you need an example for defining/firing custom events as its done quite commonly throughout Ext.
Thank you...
I see..
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.