Results 1 to 5 of 5

Thread: card layout navigation

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
      0  

    Default Answered: card layout navigation

    Hi

    In card layout I need prev next button to navigate to respective pages.
    Can Anyone help
    -Ram

  2. It's trivial to get the index...

    Code:
    var activeItem = container.getActiveItem(),
        innerItems = container.getInnerItems(),
        index = innerItems.indexOf(activeItem);

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Have a docked toolbar with two buttons. Then use setActiveItem to go to the item you want active.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
      0  

    Default

    Hi..
    The 'this.getActiveItem' returns object/function instead of index number. Without that.. its difficult to dynamically set the values of prev and next button index.
    -Ram

  5. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    It's trivial to get the index...

    Code:
    var activeItem = container.getActiveItem(),
        innerItems = container.getInnerItems(),
        index = innerItems.indexOf(activeItem);
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  6. #5
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
      0  

    Default

    Thanks Mitchell
    Its working fine now
    -Ram

Tags for this Thread

Posting Permissions

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