Results 1 to 4 of 4

Thread: How to close a Ext.window?

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    8
    Vote Rating
    0
      0  

    Default Answered: How to close a Ext.window?

    how to close a Ext.window?
    what's the difference between close() and destroy()?

  2. 1. To close a window, just call <window>.close()
    2. <window>.destroy() will destroy the window. Default action of close() is the same as destroy(). You can change behavior of close() by setting closeAction to 'hide' or 'destroy'. Also, close() will fire beforeclose event that allows you to cancel close action.

  3. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,211
    Answers
    753
    Vote Rating
    1005
      0  

    Default

    It's all in the docs:

    Closes the Panel. By default, this method, removes it from the DOM, destroys the Panel object and all its descendant Components. The beforeclose event is fired before the close happens and will cancel the close action if it returns false.

    Note: This method is also affected by the closeAction setting. For more explicit control use destroy and hide methods.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  4. #3
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france / geneve suisse
    Posts
    147
    Answers
    12
    Vote Rating
    2
      0  

    Default events

    Hello
    The close method fired an event.

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347
    Vote Rating
    119
      0  

    Default

    1. To close a window, just call <window>.close()
    2. <window>.destroy() will destroy the window. Default action of close() is the same as destroy(). You can change behavior of close() by setting closeAction to 'hide' or 'destroy'. Also, close() will fire beforeclose event that allows you to cancel close action.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •