[Users] How to trigger click on button in toolbar

Vidal, Antoni antoni.vidal at icc.cat
Thu Feb 17 14:11:34 CET 2011


It works !

Thanks a lot.

Toni.

-----Missatge original-----
De: Andreas Hocevar [mailto:ahocevar at opengeo.org] 
Enviat: jueves, 17 de febrero de 2011 13:52
Per a: Vidal, Antoni
A/c: users at geoext.org
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:ahocevar at opengeo.org] 
> Enviat: jueves, 17 de febrero de 2011 12:22
> Per a: Vidal, Antoni
> A/c: users at geoext.org
> 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
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
> 
> 
> 
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> 
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list