PDA

View Full Version : Expand event doesn't fire in borderlayout



SharePat
30 Jun 2010, 1:39 AM
Hi,

I want to do some things dynamically when expanding a collapsed panel in a borderlayout panel.
Apparently the expand event only fires when clicking on the double arrow, but not when clicking anywhere else on the collapsed panel.
I tried a few other events but couldn't find one firing at the right moment.
Did I miss an existing event, is this a bug, or should I try something else ?

Thanks for your reply,
Pat

P.S. Just add the following listener in the BorderLayout example's west panel to see what I mean:

listeners:{'expand': function() { alert('expanded')}},

Animal
30 Jun 2010, 2:02 AM
Yes, it is a "problem" in Ext.

The thing is the Panel does not actually get collapsed or expanded. It is shuffled in and out of visibility by the layout manager.

I think that the layout manager should fire an "expand" or "collapse" event through Component, so that you can do things like that.

I will add this as a Feature Request.

Animal
30 Jun 2010, 2:07 AM
http://www.sencha.com/forum/showthread.php?102914-BorderLayout-should-fire-expand-and-collapse-events-through-the-Component

SharePat
30 Jun 2010, 2:39 AM
Thanks a lot, Animal !