Python script tool stylesheet help!!!

4290
4
01-01-2012 06:29 AM
BadarMunir
New Contributor
Hi,
  I don't know if this is the correct forum to post this problem. If it's not, then plz move this post to the right one.

I want to use custom stylesheet for some script tools that I developed in python ArcGIS 9.3. I searched and found the following link.

http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?

I exactly followed the instructions but I can't even get the very first step working described in the link-i.e. changing the background image of the tool. I can't even make my tool to read "MdDlgContent.xsl" present in <ArcGIS>\ArcToolbox\Stylesheets\MdDlgContent.xsl by default because if I use this sheet it should display esri logo in the tool dialogue box but it doesn't.

After giving tool the path of my modified (given background image path to my own image xyz.gif) MdDlgContent.xsl stylesheet, the tool dialogue box opens like before-no changes at all. I then found SSContent.xsl in the same mentioned link. I tried to use that and changed the paths and names w.r.t my PC. This time, tool dialogue box didn't even open with no errors.

Any Ideas???
Tags (2)
0 Kudos
4 Replies
BadarMunir
New Contributor
I need to know urgently about changing the outlook of the tool dialogue box. Please let me know where can I get any useful information on that if nobody is willing to help me on this forum.

Regards
0 Kudos
DarrenWiens2
MVP Honored Contributor
My MdDlgHelp_xsl.xsl does not even include BackgroundImage as a variable. You can add it, though.

Change the line: <xsl:variable name="BackgroundColor">White</xsl:variable>
to: <xsl:variable name="BackgroundImage">url(H:\Docs\Thumbnails\Jasper Map_thumb.gif)</xsl:variable>

*change the above url to point to your image.

Now, find and change the following line: background-color: <xsl:value-of select="$BackgroundColor"/>
to: background-image: <xsl:value-of select="$BackgroundImage"/>

Finally, go into your tool properties and point the Stylesheet to your modified file.
0 Kudos
AnnStark
New Contributor II
I had this trouble too, but discovered farther down in the MdDlgContent.xsl code that the BackgroundImage variable had been commented out.  To reveal the background image, remove the <!-- at the beginning and the --> at the end of the line with this on it:     background-image :    <xsl:value-of select="$BackgroundImage" />;  (around line 58).
0 Kudos
GraemeBrowning
Occasional Contributor III
I had the same requirement today and posted my solution, which was based substantially on discussion here, over in this thread.

Thanks for resolving it previously.
0 Kudos