Share on Google+Share on Google+

Dojo TabContainer

In this section, you will learn about the TabContainer and how to create its.

Dojo TabContainer


In this section, you will learn about the TabContainer and how to create its.

Try Online: Tab Container

TabContainer : This is a container that has multiple panes, but it displays only one pane at a time. There are multiple tabs corresponding to each pane, where each tab has the title and close button (label) of the pane. The close button is an optional button whenever you require. When you want to close any tab the click on the close button.



Here is the code of Program :

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TabContainer Demo</title>
  <style type="text/css">
  @import "../resources/dojo.css";
  @import "../dijit/themes/tundra/tundra.css";
  <script type="text/javascript" 
  src="dojo.xd.js" djConfig="parseOnLoad: true"></script>

  <script type="text/javascript">
<body class="tundra">
<h1>Tab Container</h1>
 <div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
  <div id="tab1" dojoType="dijit.layout.ContentPane" 
   title="First Tab"  selected="true" closable="true">
  First Tab
  <div id="tab2" dojoType="dijit.layout.ContentPane"
 title="Second Tab" closable="true">
  Second Tab
  <div id="tab3" dojoType="dijit.layout.ContentPane"
 title="Third Tab" closable="true">
  Third Tab

Output of the Program :


Try Online:



Posted on: November 1, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Dojo TabContainer   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
November 10, 2011
Dojo TabContainer

It shows wrong out put in online
January 19, 2013

Whoeevr edits and publishes these articles really knows what they're doing.
Shambhu Kumar
July 16, 2014
On Button click set the focus on different tabs

Hi, The content of this page is good and helpful. In my app i need to change focus from one tab to another on a button click.How can i do it? Please help me. Thanks...