Giannis
Giannis

Reputation: 91

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

Upvotes: 2

Views: 11571

Answers (2)

Saurabh Gokhale
Saurabh Gokhale

Reputation: 46395

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

Use hide() function.

Like this,

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

Upvotes: 8

Thiem Nguyen
Thiem Nguyen

Reputation: 6365

Have you tried this?

Ext.getCmp('mybutton1').hide()

Upvotes: 0

Related Questions