Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / anchoring.html
diff --git a/docs/source/anchoring.html b/docs/source/anchoring.html
new file mode 100644 (file)
index 0000000..da05da5
--- /dev/null
@@ -0,0 +1,53 @@
+<html>\r
+<head>\r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js">Ext.onReady(function() {\r
+    var form = new Ext.form.FormPanel({\r
+        baseCls: 'x-plain',\r
+        labelWidth: 55,\r
+        url:'save-form.php',\r
+        defaultType: 'textfield',\r
+\r
+        items: [{\r
+            fieldLabel: 'Send To',\r
+            name: 'to',\r
+            anchor:'100%'  // anchor width by percentage\r
+        },{\r
+            fieldLabel: 'Subject',\r
+            name: 'subject',\r
+            anchor: '100%'  // anchor width by percentage\r
+        }, {\r
+            xtype: 'textarea',\r
+            hideLabel: true,\r
+            name: 'msg',\r
+            anchor: '100% -53'  // anchor width by percentage and height by raw adjustment\r
+        }]\r
+    });\r
+\r
+    var window = new Ext.Window({\r
+        title: 'Resize Me',\r
+        width: 500,\r
+        height:300,\r
+        minWidth: 300,\r
+        minHeight: 200,\r
+        layout: 'fit',\r
+        plain:true,\r
+        bodyStyle:'padding:5px;',\r
+        buttonAlign:'center',\r
+        items: form,\r
+\r
+        buttons: [{\r
+            text: 'Send'\r
+        },{\r
+            text: 'Cancel'\r
+        }]\r
+    });\r
+\r
+    window.show();\r
+});</pre>    \r
+</body>\r
+</html>
\ No newline at end of file