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
Post a Comment