Hi,

iconCls is not a property of the OpenLayers.Control, but of the
GeoExt.Action that wraps the control. So you just need to move the
iconCls assignment 2 lines down, and you'll be fine.

Andreas.

On Fri, Feb 17, 2012 at 11:27 AM, Francesc Cañas <kikoca...@gmail.com> wrote:
> What I have in css is:
>
> .Zoom_in{
> background-image:url(/OpenLayers/theme/default/img/drag-rectangle-on.png)!important;
> width:22px !important;
> height:22px !important;
> }
>
> But still adding .x-btn. doesn't work.
>
> I link the .css with <link rel="stylesheet" type="text/css"
> href="IconCls.css"></link> and the file is at the same folder as html. The
> OpenLayers folder is there too.
>
> The code of the control is
>
> action = new GeoExt.Action({
> control: new OpenLayers.Control.ZoomToMaxExtent(),
>        map: map,
>        //text: "max_extent",
> iconCls: "Zoom_extent",
>         tooltip: "zoom to max extent"
> });
> actions["Zoom_extent"] = action;
> toolbarItems.push(action);
>
> When I've added the .x-btn. and it doesn't work I've tried to add at IconCls
> ".x-btn.Zomm_extent" but neither works.
>
>
> --
> http://kikocanas.blogspot.com



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to