Search code examples
extjs4

What is the difference between "activate" and "show" events on Ext.panel.Panel in Extjs 4?


Various Ext components (like Panel and Container) have the following events documented:

"show" - Fires after the component is shown when calling the show method.

"activate" - Fires after a Component has been visually activated.

What I would like to know is:

  • What is the difference between these two events?

  • Are there specific instances where you would want to use one over
    another?

  • At what point of the layout cycle do they both fire?

Solution

  • Activate : 1. It will be triggered, after the component(DOM) has been loaded with all referece link and shown to the user. 2. Layout lifecycle - basic component creation

    Show : 1. It will be triggered, after the component has been shown at the time when we invoke the method "show" of the component. 2. Layout lifecycle - when we call show method of the component.

    Thanks.