[Dojo-checkins] bill - r3619 - trunk/tests/widget
dojo-checkins-admin at dojotoolkit.org
dojo-checkins-admin at dojotoolkit.org
Thu Apr 20 06:11:28 MDT 2006
Author: bill
Date: Thu Apr 20 06:11:28 2006
New Revision: 3619
Added:
trunk/tests/widget/test_LayoutCode.html
Log:
test of layout container programmatic instantiation.
Added: trunk/tests/widget/test_LayoutCode.html
==============================================================================
--- (empty file)
+++ trunk/tests/widget/test_LayoutCode.html Thu Apr 20 06:11:28 2006
@@ -0,0 +1,30 @@
+<html>
+<script type="text/javascript">
+ var djConfig = {isDebug: true};
+</script>
+<script type="text/javascript" src="../../dojo.js"></script>
+<script type="text/javascript">
+dojo.require("dojo.widget.LayoutContainer");
+dojo.require("dojo.widget.ContentPane");
+
+function init() {
+ var layout = dojo.widget.createWidget("LayoutContainer");
+ document.body.appendChild(layout.domNode);
+ layout.domNode.style.cssText="width: 500px; height: 500px; border: 1px solid blue; background: gray; display: block;";
+ layout.domNode.style.height="500px";
+ var taulu=["top","bottom","client","right","left"];
+ for(i=0; i<taulu.length; ++i) {
+ var content = dojo.widget.createWidget("ContentPane", {layoutAlign: taulu[i]});
+ content.domNode.style.cssText="width: 100px; height: 100px; border: 1px solid red; display: block;";
+ content.setContent(taulu[i]);
+ layout.addChild(content);
+ }
+ layout.onResized();
+}
+dojo.addOnLoad(init);
+</script>
+<body>
+<h1>Test of layout code programmatic creation</h1>
+<p>Note: currently you have to set display:block manually.</p>
+</body>
+</html>
More information about the Dojo-checkins
mailing list