extjs4.1 - Extjs 4.1 - Show and hide some special Items in a form -


i have windows items include 2 items like

var win = ext.create('ext.window.window', {         title: 'hello',         height: 200,         width: 400,         layout: 'fit',         items: {               xtype: 'form',             border: false,             hidden: true,             items: [{                 xtype: 'textfield',                 fieldlabel: '1'             },{                 xtype: 'textfield',                 fieldlabel: '2'             }]         }     }).show(); 

i make button , want show/hide first item (fieldlabel : '1') in window like

 ext.create('ext.button', {         text: 'show first item',         visible: false,         renderto: ext.getbody(),         handler: function() {             win.down('form').items.items[0].show(); // not working         }     }); 

but that's not working. how fix thanks

ps: don't want use id comp, b/c form dynamic
here full code http://jsfiddle.net/amkjn/

try this. show first textfield.

ext.create('ext.button', {      text: 'show first item',      visible: false,      renderto: ext.getbody(),      handler: function() {          win.items.items[0].show();         win.items.items[0].items.items[1].hide();     } }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -