Results 1 to 3 of 3

Thread: sencha touch equivalent of setActiveTab?

  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    1
    Vote Rating
    0
      0  

    Default sencha touch equivalent of setActiveTab?

    I'm trying to programatically flip a tab. For the example below, in ExtJS 3 has something like alphabet.setActiveTab(2) to flip to the "c" tab, but not sure how to do this with Sencha Touch. Looking in API docs, I see getActiveItem and getActiveTab, but no setter methods.

    alphabet = new Ext.TabPanel({
    activeItem: 0,
    items:[{
    id: 'a'
    },{
    id: 'b'
    },{
    id: 'c'
    }
    ]
    });

    The differences between Sencha Touch and EXTJS are really inconvenient, the 0.9.1 ST release didn't even have Ext.pluck

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    1
      0  

    Default

    A tabpanel implements the card layout, and hence setActiveItem will flip tabs. If you want that function available then add a post to the feature request board.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,583
    Vote Rating
    873
      0  

    Default

    Anything that has a card layout has a setCard method injected onto the container at runtime, I recently updated the docs to indicate as such.

    So:

    Code:
    tabs.setCard(1);
    In future, please use code tags on your code!
    Evan Trimboli
    Twitter - @evantrimboli

Similar Threads

  1. Ext JS and Sencha Touch!
    By mcamer in forum Sencha Touch 1.x: Discussion
    Replies: 8
    Last Post: 1 Dec 2010, 10:19 AM
  2. Sencha Touch on iPhone v1 / iPod touch v1 ?
    By palnap in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 28 Oct 2010, 5:30 PM
  3. Features of Sencha Touch
    By metalsiren in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 21 Jul 2010, 8:02 AM
  4. Sth like TabPanel.setActiveTab for TabPanel in Sencha Touch?
    By n5680 in forum Sencha Touch 1.x: Discussion
    Replies: 8
    Last Post: 20 Jun 2010, 2:53 PM

Posting Permissions

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