[OpenLayers-Users] Enable/Disable state for Toolbar buttons?

Andreas Hocevar ahocevar at boundlessgeo.com
Thu Feb 13 02:36:12 PST 2014


Personally I would remove disabled tools from the panel. If you prefer to
keep disabled tools visible, I'd just add a setDisabled method to
OpenLayers.Control, which modifies the displayClass. Then you can use CSS
to customize the appearance of disabled buttons.

Andreas.


On Wed, Feb 12, 2014 at 6:46 PM, Martin Davis <mtnclimb at gmail.com> wrote:

> We're wanting to have a Disabled state for some Buttons on a Toolbar, in
> order to indicate to the user that some tools are not currently available.
>
> It appears that this is not supported by the current OL2 code?  There was
> a thread about this waaay back in 2007:
>
> http://osdir.com/ml/openlayers-users-gis/2007-11/msg00373.html
>
> Did anything ever come of this?  Does anyone have any suggestions or code
> that might provide this functionality?
>
> Otherwise, we may just roll up our sleeves and try and add this to a
> extension to the Toolbar (and possibly Controls).
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140213/d9eba0a9/attachment.html>


More information about the Users mailing list