[mapguide-users] Change the Icon image of the tool bar command buttons

Ivan Miličević Ivan.Milicevic at supranet.hr
Thu Apr 15 08:05:45 EDT 2010


Hello again. Of course that you can change image of icon :/

Look at toolbar.templ and call InitToolbar() function after you change image source.

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of SriRam007
Sent: Thursday, April 15, 2010 1:47 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Change the Icon image of the tool bar command buttons


Hi everyone,

Is there any way to change the Icon image of the tool bar command buttons

Using GetCommands methods i got all the command list 
and i m doing enable and disable using javascript like below 

var cmd = commands[0];//This is for getting Pan Command
if(condition)
{
  cmd.enabled=false; //working
  cmd.iconDisabled = "../stdicons/icon_pan_disabled.gif"; //not working
  cmd.icon = "../stdicons/icon_pan.gif";//not working
}
else
{
  cmd.enabled=true;//working
  cmd.iconDisabled = "../stdicons/icon_pan_disabled.gif";//not working
  cmd.icon = "../stdicons/icon_pan.gif";//not working
}

But there are two property iconDisabled and icon which i set but still that
image is not changing

Actually here i m setting one image when the command buttons is disable
state and another when i m making it enable.

any help please

thanks





-- 
View this message in context: http://n2.nabble.com/Change-the-Icon-image-of-the-tool-bar-command-buttons-tp4906988p4906988.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list