It works ! Thanks a lot.
Toni. -----Missatge original----- De: Andreas Hocevar [mailto:[email protected]] Enviat: jueves, 17 de febrero de 2011 13:52 Per a: Vidal, Antoni A/c: [email protected] Tema: Re: [Users] How to trigger click on button in toolbar On Feb 17, 2011, at 12:48 , Vidal, Antoni wrote: > Hi Andreas, > > Is not so easy. > > Ext.getCmp('infobtn').activate(); generates the following error: > Ext.getCmp("infobtn").activate is not a function To create your action: var action = new GeoExt.Action({ control: myControl, ... }); To press/unpress the button: myControl.activate(); myControl.deactivate(); > > Any idea? > > Thanks > > Toni. > > -----Missatge original----- > De: Andreas Hocevar [mailto:[email protected]] > Enviat: jueves, 17 de febrero de 2011 12:22 > Per a: Vidal, Antoni > A/c: [email protected] > Tema: Re: [Users] How to trigger click on button in toolbar > > Hi, > > the easiest way is to activate or deactivate the control that is associated > with the GeoExt.Action, using the activate() or deactivate() methods. > > Regards, > Andreas. > > On Feb 17, 2011, at 11:08 , Vidal, Antoni wrote: > >> Hello list, >> >> I've a toolbar in a mappanel with several GeoExt.Action buttons. I would >> like to change to pressed one of this buttons when users makes click in an >> html link inside a treepanel item. >> >> Any tips or suggestion will be appreciated. >> >> Antoni Vidal >> Unitat d'Aplicacions SIG-WEB >> Institut Cartogràfic de Catalunya >> Parc de Montjuïc, E-08038 Barcelona >> Tel. (+34) 93 567 15 00 (ext. 3228) >> www.icc.cat >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://www.geoext.org/cgi-bin/mailman/listinfo/users > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
