Results 1 to 2 of 2

Thread: How to override a event?

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    163
    Vote Rating
    0
      0  

    Default Answered: How to override a event?

    Hi

    how to override tab panel's resize event application wide?

    i did something like this but it doesn't seems to work

    Code:
        Ext.override(Ext.tab.Panel, {
            onResize: function() {
                console.log(this);
            }
        });

    Regards

  2. Hi extremed,
    you need to override the resize event of tab panel as below:

    Code:
    Ext.override(Ext.tab.Panel,{
         listeners: {
            resize: function (tab,width,height,oldWidth,oldHeight) {
                console.log('tab panel resize event');
                // you can put your code here that you want to do after resize of tabpanel.
            }
        }
    });
    
    For more information about resize event of tab panel visit:
    http://docs.sencha.com/ext-js/4-1/#!...l-event-resize

  3. #2
    Sencha User sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,335
    Answers
    124
    Vote Rating
    93
      0  

    Default

    Hi extremed,
    you need to override the resize event of tab panel as below:

    Code:
    Ext.override(Ext.tab.Panel,{
         listeners: {
            resize: function (tab,width,height,oldWidth,oldHeight) {
                console.log('tab panel resize event');
                // you can put your code here that you want to do after resize of tabpanel.
            }
        }
    });
    
    For more information about resize event of tab panel visit:
    http://docs.sencha.com/ext-js/4-1/#!...l-event-resize
    Last edited by sword-it; 10 Aug 2012 at 12:31 AM. Reason: formatting of code
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

Posting Permissions

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