Results 1 to 5 of 5

Thread: how to trigger a close function of contentpanel

  1. #1

    Default how to trigger a close function of contentpanel

    If i want to trigger a close function of Ext.ContentPanel in the center of the BorderLayout
    What can i do?

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    Code:
    layout.getRegion('center').remove(something);
    http://extjs.com/deploy/ext/docs/out...on.html#remove

  3. #3

    Default

    Sorry I made a mistake what i mean is that if i want to do something when i close a ContentPanel what should i do?

  4. #4
    Ext User Skeleton's Avatar
    Join Date
    Mar 2007
    Location
    İstanbul
    Posts
    68

    Default

    Here is a code snippet from one of our project which listens for content panel removals on center region:

    Code:
    layout = new Ext.BorderLayout(document.body, {
    ...
    ...
    });
    
    centerRegion = layout.getRegion('center');
    
    centerRegion.on('panelremoved', function(region, panel) {
    
    	// Here, you can use the incoming region and panel objects accordingly
    
    }, this);
    "In Ext, we trust!"
    huseyint.com

  5. #5

    Default

    Thanks I think I should learn how to read the API doc.

Posting Permissions

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