PDA

View Full Version : Event Question



Bleak
6 May 2010, 4:06 AM
Is there an event that is fired after a component and all of its child components are rendered? I have a tab panel, with one tab having two GridPanels. I want to fire an event on the parent tab panel when it is fully rendered including its children.

Thanks,
Dean.

Animal
6 May 2010, 5:24 AM
afterlayout with {single: true}

Mike Robinson
6 May 2010, 6:43 AM
FYI, and in keeping with Animal's comment above: I have also noticed that sometimes many problems are avoided by adding "delay: 250" (or some such value) to various event handler definitions. This asks ExtJS to present the event very-slightly after it thinks that the event has occurred.

Some browsers (including The Browser That Must Not Be Named ;)) seem to have timing-holes, whereby the event handler finds that, "no, the DOM isn't quite ready yet, as it should be." Just a few microseconds later, all is well, but by then it's too late. A very slight delay, far too short for the user to actually notice, has become almost an instinctive practice for me.

Bleak
6 May 2010, 6:51 AM
Thanks guys, I appreciate the quick response.