[Users] How to disable a button wrapped in an action?
Pierre Giraud
pierre.giraud at camptocamp.com
Wed Nov 7 17:53:25 CET 2012
You should simply be able to call setDisabled on your action and expect any
button created linked to this action to be disabled.
action.setDisabled(true);
On Mon, Nov 5, 2012 at 10:36 AM, Robert Buckley <robertdbuckley at yahoo.com>wrote:
> Hi,
>
> I have an WMSGetFeatureinfo button defined within an action as follows in
> Extjs 3.4
>
> action = new GeoExt.Action({
> id:"wms_info_btn",
> text: "",
> tooltip: "Features Abfragen",
> toggleGroup: 'mapTools',
> icon: 'images_big/10_identify.png',
> hidden:false,
> control: featureInfo,
> map: map
> });
> actions["Select"] = action;
> toolbarItems.push(action);
>
>
> This work fine....but if the layer node - "activemode" - isn´t checked,
> the busyMask runs indefinately. I am trying to identify if the node is
> checked or not. I can do this with the following code.
>
>
> if (typeof(activenode) == "undefined"){
> // Ext.get('wms_info_btn').dom.disabled = true;
> }
>
> but I can't reference the button in the toolbar to disable it .....I guess
> because it is an action.
>
>
> Can anyone help me get a reference to the actual button?
>
> yours,
>
> Robert
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
--
Pierre GIRAUD
Géomaticien, Analyste
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20121107/6d77f823/attachment.htm
More information about the Users
mailing list