3 * Copyright(c) 2006-2009 Ext JS, LLC
5 * http://www.extjs.com/license
7 Ext.onReady(function(){
\r
8 var ct = new Ext.form.FormPanel({
\r
9 renderTo: 'container',
\r
12 title: 'User Details',
\r
13 defaultType: 'textfield',
\r
17 fieldLabel: 'First Name'
\r
19 fieldLabel: 'Middle Name'
\r
21 fieldLabel: 'Last Name'
\r
27 afterrender: function(form){
\r
30 completeOnEnter: true,
\r
33 ignoreNoChange: true
\r
36 var labelEditor = new Ext.Editor(Ext.apply({
\r
39 beforecomplete: function(ed, value){
\r
40 if(value.charAt(value.length - 1) != ':'){
\r
41 ed.setValue(ed.getValue() + ':');
\r
45 complete: function(ed, value, oldValue){
\r
46 Ext.example.msg('Label Changed', '"{0}" changed to "{1}"', oldValue, value);
\r
56 form.body.on('dblclick', function(e, t){
\r
57 labelEditor.startEdit(t);
\r
59 delegate: 'label.x-form-item-label'
\r
62 var titleEditor = new Ext.Editor(Ext.apply({
\r
63 cls: 'x-small-editor',
\r
64 alignment: 'bl-bl?',
\r
67 complete: function(ed, value, oldValue){
\r
68 Ext.example.msg('Title Changed', '"{0}" changed to "{1}"', oldValue, value);
\r
73 triggerAction: 'all',
\r
76 forceSelection: true,
\r
77 store: ['User Details', 'Developer Details', 'Manager Details']
\r
81 form.header.child('.x-panel-header-text').on('dblclick', function(e, t){
\r
82 titleEditor.startEdit(t);
\r