Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:27:55+00:00 2026-06-07T17:27:55+00:00

I have a tabpanel , and a button on the 1st tab. When i

  • 0

I have a tabpanel, and a button on the 1st tab. When i click on that button, i need to setfocus to the 2nd tab and activate it (as in show content that belongs to that tab). My code is as follows, and i unable to setFocus or activate that tab from the Button click event.

Ext.define('MyApp.view.MyTabPanel', {
    extend: 'Ext.tab.Panel',

    height: 250,
    width: 400,
    activeTab: 0,

    initComponent: function () {
        var me = this;

        Ext.applyIf(me, {
            items: [{
                xtype: 'panel',
                title: 'Tab 1',
                items: [{
                    xtype: 'button',
                    text: 'MyButton',
                    listeners: {
                        click: {
                            fn: me.onButtonClick,
                            scope: me
                        }
                    }
                }]
            }, {
                xtype: 'panel',
                title: 'Tab 2'
            }, {
                xtype: 'panel',
                title: 'Tab 3'
            }]
        });

        me.callParent(arguments);
    },

    onButtonClick: function (button, e, options) {
        // Set Focus, and activate the 2nd tab
    }

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:27:58+00:00Added an answer on June 7, 2026 at 5:27 pm

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.tab.Panel-method-setActiveTab

    There are also several examples of setting the active tab at the class level documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tab panel that gets populated with a grid when a button
I have the following code: <rich:tabPanel switchType=client> <rich:tab name=tab1 label=tab1 onclick=alert('Hello');> ... </rich:tab> <rich:tab
I have some JavaScript code and a button which already has an event/action assigned
I have the following code, which generates a basic layout for my app: tabpanel
I have Ajax TabPanel with Tab Employee List Add Employee Edit Employee On Employee
I have some html code, so: <div class=ui-tabs-panel> <div class=dataTables_wrapper> <div> <button>Add Whatever</button> </div>
I have the following extjs code that createa 2 tabs and a grid. How
I have a simple tabpanel. I want to fetch currently active tab's child components
EDIT I have a viewport that extends a TabPanel. In it, I set one
I have a TabPanel whose HeaderText property I want to set using a code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.