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