source: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.js @ 625

Last change on this file since 625 was 625, checked in by ramonb, 15 years ago

lib/extjs-30:

  • new ExtJS 3.0
File size: 1.2 KB
Line 
1/*!
2 * Ext JS Library 3.0.0
3 * Copyright(c) 2006-2009 Ext JS, LLC
4 * licensing@extjs.com
5 * http://www.extjs.com/license
6 */
7Ext.onReady(function() {
8    var form = new Ext.form.FormPanel({
9        baseCls: 'x-plain',
10        labelWidth: 55,
11        url:'save-form.php',
12        defaultType: 'textfield',
13
14        items: [{
15            fieldLabel: 'Send To',
16            name: 'to',
17            anchor:'100%'  // anchor width by percentage
18        },{
19            fieldLabel: 'Subject',
20            name: 'subject',
21            anchor: '100%'  // anchor width by percentage
22        }, {
23            xtype: 'textarea',
24            hideLabel: true,
25            name: 'msg',
26            anchor: '100% -53'  // anchor width by percentage and height by raw adjustment
27        }]
28    });
29
30    var window = new Ext.Window({
31        title: 'Resize Me',
32        width: 500,
33        height:300,
34        minWidth: 300,
35        minHeight: 200,
36        layout: 'fit',
37        plain:true,
38        bodyStyle:'padding:5px;',
39        buttonAlign:'center',
40        items: form,
41
42        buttons: [{
43            text: 'Send'
44        },{
45            text: 'Cancel'
46        }]
47    });
48
49    window.show();
50});
Note: See TracBrowser for help on using the repository browser.