Select to view content in your preferred language

Layers Manager Widget by Odoe How do I change the color of the layer's text?

896
3
03-03-2011 09:51 AM
City_of_Port_Angeles_GIS
Occasional Contributor
Hi all,
   I tried to implement Odoe's Layers Manager Widget by Odoe but the names of all my layers are in a light grey color while the background is in a grey color just slightly darker than the text. I have a tough time reading the names. How can I change the text color to be darker, preferably black?
Billy
Tags (2)
0 Kudos
3 Replies
ReneRubalcava
Esri Frequent Contributor
I've been meaning to fix the itemRenderers for this.
Probably best solution would be to open these 2 itemRenderers in the source.
LayerListItemRenderer.mxml
LayerListDynamicItemRenderer.mxml

change the alpha value of the <s:Rect> to 0.
 <s:Rect left="0"
   right="0"
   top="0"
   bottom="0">
  <s:fill>
   <s:SolidColor color="#F0F8FF"
        alpha="0" /> <!-- change this from 0.6 t0 0 -->
  </s:fill>
 </s:Rect>


I'll update the source and compiled swc in zip after lunch today.
0 Kudos
ReneRubalcava
Esri Frequent Contributor
Ok, it's updated.
http://www.arcgis.com/home/item.html?id=bed0140d93ee49d8b8f8f1a5b7310c6f
You can check out a demo here.
http://odoe.net/thelab/flex/flexviewer/index.html?config=config-layersmanager.xml

If you really wanted to change the text color, you could edit the LegendManageraSkin.mxml as such.

<s:Scroller height="100%"
   width="100%">
<!-- add a color value for the DataGroup -->
 <s:DataGroup id="legendDataGroup" color="0xffff00"
     itemRendererFunction="itemRenFunc">
  <s:layout>
   <s:VerticalLayout gap="2"
         horizontalAlign="justify" />
  </s:layout>
 </s:DataGroup>
</s:Scroller>


I've thought about swf loadable stylesheets, but wasn't sure about it for widgets. (i.e. compile css to swf for widget swfs)
0 Kudos
City_of_Port_Angeles_GIS
Occasional Contributor
Thanks Rene, that works great.
Billy
0 Kudos