Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

How do I change the color of FlexViewer WidgetTemplate title?

$
0
0
How do I change the default yellow color of the FlexViewer's PrintWidget title to a color of my choice?

I noticed that WidgetTemplate has a skin part called "header", which is an s:Group that contains an s:Label--the actual header. I need a way to change the color of this header label, so I have been looking into skinning the container which is called WidgetTemplate. However, I need a way to only skin the one "header" skin part and not be responsible for rendering the rest of the container (i.e., the rectangle that defines the frame, the closeButton, contained components, et al.).

So I tried this:

Code:

<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">
  <!-- host component -->
  <fx:Metadata>
      [HostComponent("com.esri.viewer.WidgetTemplate")]
  </fx:Metadata>

  <!-- states -->
  <s:states>
      <s:State name="open" />
      <s:State name="minimized" />
      <s:State name="closed" />
      <s:State name="disabled" />
      <s:State name="normal" />
  </s:states>


  <s:Group id="header">
      <s:Label color="0x000000" />
  </s:Group>
</s:Skin>


but when I assign the skin to this widget:
Code:

<viewer:WidgetTemplate id="wTemplate"
                      width="345" height="285"
                      minWidth="345"
                      minHeight="285"
                      styleName="fontstyle"
                      accentColor="0x33FF66"
                      color="0x33FF66"
                      skinClass="widgets.Print.PrintWidgetSkin">
</viewer:WidgetTemplate>

nothing is rendered at all.

Any help on this would be greatly appreciated.

My main source on skinning is Adobe: http://help.adobe.com/en_US/flex/usi...7-701787684186.

Also, I am using ArcGIS API for Flex 3.0 and hence Adobe Flex 4.6.

Viewing all articles
Browse latest Browse all 2097

Trending Articles