Results 1 to 2 of 2

Thread: How to scroll a container automatically so that a desired component come into view.

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

    Default How to scroll a container automatically so that a desired component come into view.

    How to scroll a container automaticallyso that a desired component with in the container come into view.

    have a button.On clicking that buttonthe componet(gridCt.getComponent(7)),which is positioned quite belowin the container will come into view.


    Here is my code...
    // xtype: 'button', // default forToolbars
    text: 'Select Grid',
    listeners:{
    click:function(){
    console.log('Buttonclicked...');
    var gridCt =Ext.getCmp('FRP.view.user.Tab.gridCt');
    var cmp = gridCt.getComponent(7);
    var gridEl =gridCt.getEl();
    var cmpEl =cmp.getEl();
    cmpEl.scrollIntoView(gridEl);
    }
    }


    But this code is not working.
    I am using Extjs 4.x

  2. #2
    Sencha - Community Support Team mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,023
    Answers
    3976
    Vote Rating
    1334
      0  
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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