cryovirus
15 Sep 2010, 10:47 PM
Hello @ all!
Im working on a presentation for the iPad.
I'm new to Sencha Touch but I had managed to program the things i needed until this point:
I have to enable/disable Buttons within one Toolbar:
var tbar = new Ext.Toolbar({
dock:'bottom',
xtype: 'toolbar',
cls: 'cntr',
items: [{
text: 'Startseite',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(0, 'slide');
}
},{
text: 'page 1',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(1, 'slide');
// this button should activate the 'stats'-button :-/
}
},{
text: 'page 2',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(2, 'slide');
}
},{
text: 'page 3',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(3, 'slide');
}
},{
cls: 'space',
},{
text: 'Infos',
handler: getinfo,
cls: 'infos',
disabled: true
},{
text: 'Stats',
handler: getstats,
cls: 'infos',
disabled: true
}]
});
I had tried something like:
var mybutton = panel.getComponent(tbar).getItems();
but i have no idea how to get the 'stats'-button to set him activ with:
mybutton.setDisabled(false);
pls help :((
Im working on a presentation for the iPad.
I'm new to Sencha Touch but I had managed to program the things i needed until this point:
I have to enable/disable Buttons within one Toolbar:
var tbar = new Ext.Toolbar({
dock:'bottom',
xtype: 'toolbar',
cls: 'cntr',
items: [{
text: 'Startseite',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(0, 'slide');
}
},{
text: 'page 1',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(1, 'slide');
// this button should activate the 'stats'-button :-/
}
},{
text: 'page 2',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(2, 'slide');
}
},{
text: 'page 3',
handler: function(){
var car = panel.getComponent(carousel);
car.setCard(3, 'slide');
}
},{
cls: 'space',
},{
text: 'Infos',
handler: getinfo,
cls: 'infos',
disabled: true
},{
text: 'Stats',
handler: getstats,
cls: 'infos',
disabled: true
}]
});
I had tried something like:
var mybutton = panel.getComponent(tbar).getItems();
but i have no idea how to get the 'stats'-button to set him activ with:
mybutton.setDisabled(false);
pls help :((