Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / absform.html
1 <html>\r
2 <head>\r
3   <title>The source code</title>\r
4     <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
5     <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
6 </head>\r
7 <body  onload="prettyPrint();">\r
8     <pre class="prettyprint lang-js">Ext.onReady(function() {\r
9     var form = new Ext.form.FormPanel({\r
10         baseCls: 'x-plain',\r
11         layout:'absolute',\r
12         url:'save-form.php',\r
13         defaultType: 'textfield',\r
14 \r
15         items: [{\r
16             x: 0,\r
17             y: 5,\r
18             xtype:'label',\r
19             text: 'Send To:'\r
20         },{\r
21             x: 60,\r
22             y: 0,\r
23             name: 'to',\r
24             anchor:'100%'  // anchor width by percentage\r
25         },{\r
26             x: 0,\r
27             y: 35,\r
28             xtype:'label',\r
29             text: 'Subject:'\r
30         },{\r
31             x: 60,\r
32             y: 30,\r
33             name: 'subject',\r
34             anchor: '100%'  // anchor width by percentage\r
35         },{\r
36             x:0,\r
37             y: 60,\r
38             xtype: 'textarea',\r
39             name: 'msg',\r
40             anchor: '100% 100%'  // anchor width and height\r
41         }]\r
42     });\r
43 \r
44     var window = new Ext.Window({\r
45         title: 'Resize Me',\r
46         width: 500,\r
47         height:300,\r
48         minWidth: 300,\r
49         minHeight: 200,\r
50         layout: 'fit',\r
51         plain:true,\r
52         bodyStyle:'padding:5px;',\r
53         buttonAlign:'center',\r
54         items: form,\r
55 \r
56         buttons: [{\r
57             text: 'Send'\r
58         },{\r
59             text: 'Cancel'\r
60         }]\r
61     });\r
62 \r
63     window.show();\r
64 });</pre>    \r
65 </body>\r
66 </html>