[Users] Getting navigation history images displayed in a toolbar.
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Aug 25 07:03:01 CEST 2010
On Wednesday, August 25, 2010, Phil Scadden <p.scadden at gns.cri.nz> wrote:
> I want to get navigation history icons displayed in a quite complex
> toolbar. I am doing this with:
> var nav = new OpenLayers.Control.NavigationHistory();
> var action1 = new GeoExt.Action({
> text: "previous",
> control: nav.previous,
> disabled: true
> });
>
>
> var action2 = new GeoExt.Action({
> text: "next",
> control: nav.next,
> disabled: true
> });
> var mapTBar = new Ext.Toolbar({
> defaults: {
> scale: 'medium',
> iconAlign:'top'
> },
> items: [
> {
> xtype: 'buttongroup',
> title: 'Navigation',
> defaults: {
> scale: 'medium',
> iconAlign:'top'
> },
> items: [panZoomButton,action1,action2]
> etc.
>
>
> The problem is that I only see text, not the default icons (which are in
> theme/default/img directory. - the OL navigationhistory examples work
> fine if I save the source and run it from same place). It seems I need
> to override an ext stylesheet somewhere but where?
Hi. You need to set iconCls in the Actions and have CSS for your icon
classes. See the API doc of Ext.Button, it should be documented there.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list