Search code examples
sencha-touchextjssencha-touch-2sencha-architect

sencha hide show button


Hi i am new to sencha and i try to find out how some things work in sencha architect /sencha touch.

i found a project http://miamicoder.com/2012/how-to-create-a-sencha-touch-2-app-part-1/ and i try to make that in architect.

at this point i try to make the toolbar on top of my app. i have some buttons there that switch between my cards.

i want the button that goes to my first screen starts hidden so looks like back when i am at my second screen. i setted events for my buttons

this.setActiveItem(0);

and i tried

Ext.select("#mybutton1").hidden = true;
mybutton1.setVisible(false);

but they don't work... any ideas?

also if anyone has any tutorial/ example about everything please advice... thanx


Solution

  • hidden property or setVisible(false) won't do it here.

    Use hide() function.

    Like this,

    Ext.getCmp('buttonId').hide()