PDA

View Full Version : toolbar



genius551v
26 Apr 2007, 6:30 AM
Hi,

as could to know whichever buttons has the toolbar?

como podria saber cuantos botones tiene una toolbar?

tnks

tryanDLS
26 Apr 2007, 7:30 AM
I don't know if this question makes sense in English or whatever the other language is. Please post with titles that more than a single word, and form complete sentences with your questions. As it stands, I have no clue what you're asking.

jsakalos
26 Apr 2007, 8:33 AM
It's not documented but Ext.Toolbar uses internal MixedCollection items to store buttons.

jweber
26 Apr 2007, 11:28 AM
He's asking: how do you know how many buttons a toolbar has?

genius551v
26 Apr 2007, 11:32 AM
It's not documented but Ext.Toolbar uses internal MixedCollection items to store buttons.

Great man, tanks!


AllButtons : function(){
alert('items:'+center_tb.items.getCount());
for(var i=0; i<center_tb.items.getCount(); i++){
var boton = center_tb.items.get(i);
alert('boton:'+boton.text);
}
},

jsakalos
26 Apr 2007, 5:17 PM
If you assign ids to Toolbar Items you can get them by:


var itemxy = tb.items.get('item-xy-id');

and then, for example:


alert(itemxy.text);

I'm glad I helped.