Sha256: 11dea3aa3082260a138f8d3ee0bd8d6bda888a2338c6826ace15c2e960b01bc4

Contents?: true

Size: 1.82 KB

Versions: 7

Compression:

Stored size: 1.82 KB

Contents

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>dijit.layout.TabContainer Programmatic Test</title>

	<!-- only needed for test files: -->
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../css/dijitTests.css";
	</style>

	<!-- required: the default dijit theme: -->
	<link id="themeStyles" rel="stylesheet" href="../../../dijit/themes/tundra/tundra.css">

	<!-- required: dojo.js -->
	<script type="text/javascript" src="../../../dojo/dojo.js"
		djConfig="isDebug: true, parseOnLoad: true"></script>

	<!-- only needed for alternate theme testing: -->
	<script type="text/javascript" src="../_testCommon.js"></script>

	<script type="text/javascript">
		dojo.require("dijit.dijit"); // optimize: load dijit layer
		dojo.require("dijit.layout.TabContainer");
        dojo.require("dijit.layout.ContentPane");

		var tc, cp1, cp2, cp3;
		dojo.addOnLoad(function(){
 				tc = new dijit.layout.TabContainer({style:'height:200px;width:500px;'}, dojo.byId('main'));
 
				cp1 = new dijit.layout.ContentPane({title: 'Tab 1'});
				cp1.domNode.innerHTML = "Contents of Tab 1";
				tc.addChild(cp1);

				cp2 = new dijit.layout.ContentPane({title: 'Tab 2'});
				cp2.domNode.innerHTML = "Contents of Tab 2";
				tc.addChild(cp2);

                tc.startup();
        });
        
        function addTab(){
			cp3 = new dijit.layout.ContentPane({title: 'Tab 3'});
			cp3.domNode.innerHTML = "Contents of Tab 3";
			tc.addChild(cp3);
        }
	</script>
</head>
<body class="tundra">
	<h2 class="testTitle">dijit.layout.TabContainer programmatic test</h2>
	<div id='main'>
	</div>

	<button onclick="tc.selectChild(cp2);">select tab 2</button>
	<button onclick="tc.removeChild(cp2);">remove tab 2</button>
	<button onclick="addTab();">add tab 3</button>
</body>
</html>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dojo-pkg-1.132.0 data/dojo-release-1.3.2-src/dijit/tests/layout/test_TabContainer_prog.html
dojo-pkg-1.120.0 data/dojo-release-1.2.0-src/dijit/tests/layout/test_TabContainer_prog.html
dojo-pkg-1.121.0 data/dojo-release-1.2.1-src/dijit/tests/layout/test_TabContainer_prog.html
dojo-pkg-1.122.0 data/dojo-release-1.2.2-src/dijit/tests/layout/test_TabContainer_prog.html
dojo-pkg-1.123.0 data/dojo-release-1.2.3-src/dijit/tests/layout/test_TabContainer_prog.html
dojo-pkg-1.130.0 data/dojo-release-1.3.0-src/dijit/tests/layout/test_TabContainer_prog.html
dojo-pkg-1.131.0 data/dojo-release-1.3.1-src/dijit/tests/layout/test_TabContainer_prog.html