3 Replies Latest reply on Mar 27, 2011 11:51 PM by Shongrunden

    chromeColor affecting focusColor

    DMcQ Level 1

      (I'm using the latest build of Flex 4.5.)

       

      I'm setting the chromeColor on an s:SparkSkin, but my assumption was that this wouldn't affect the focus color on any of the child components. Unfortunately the focus color is getting shifted by the chromeColor and not preserving it's own setting. If I'm reading the Flex spec correctly, focusColor shouldn't be affected by chromeColor.

       

      So if I have something like this:

       

       

      <s:SparkSkin

        xmlns:fx="http://ns.adobe.com/mxml/2009"

        xmlns:s="library://ns.adobe.com/flex/spark"

        xmlns:mx="library://ns.adobe.com/flex/mx"

        xmlns:myComps="*"

        chromeColor="#0000FF"

        useChromeColor="true"

        focusColor="#FF0000"

      >

       

      The components in the skin are showing up #0000FF blue (that's good) but the focus color is showing up purple instead of red.

       

      Has anybody else experienced this (and hopefully figured out a workaround)?


      Thanks,

       

      Daniel

       

        • 1. Re: chromeColor affecting focusColor
          Shongrunden Adobe Employee

          I haven't been able to reproduce this, can you provide a small sample application that demonstrates what you are seeing?

          • 2. Re: chromeColor affecting focusColor
            DMcQ Level 1

            Shongrunden,

             

            Thanks for your response, here's a simplified version of the skin I'm using. Note that the chromeColor is being picked up by a component class. If this color changes, the proper thing to happen is that the "library symbol" in the swfLoader changes color.  The strange thing is that the focus glow on the text area will change to this color as well, or some intermediate color (but definitely not blue, the original and un-chrome-colored focus glow).

             

            Please note I'm using Flex 4.5.19786

             

            Daniel

             

             

             

            <?xml version="1.0" encoding="utf-8"?>

            <s:SparkSkin

            xmlns:fx="http://ns.adobe.com/mxml/2009"

            xmlns:s="library://ns.adobe.com/flex/spark"

            xmlns:mx="library://ns.adobe.com/flex/mx"

            xmlns:myComps="*"

            hitArea="{symbolHitArea}"

            chromeColor="{hostComponent.color}"

            useChromeColor="true"

            >

             

             

            <!-- host component -->

            <fx:Metadata>

            [HostComponent("some.host.component")]

            </fx:Metadata>

             

             

             

            <!-- states -->

            <s:states>

            <s:State name="normal" />

            </s:states>

             

             

            <s:RichEditableText id="retSymbolText"

            left="5" right="10"

            top="0" bottom="0"

             

             

            />

             

            <s:SWFLoader id="swfLibrarySymbol"

             

            excludeFrom="customSymbol"

            source="{hostComponent.librarySymbolSource}"

            maintainAspectRatio="false"

            width="100%" height="100%"/>

             

             

             

             

            </s:SparkSkin>

            • 3. Re: chromeColor affecting focusColor
              Shongrunden Adobe Employee

              Having just the skin code isn't enough information.  Can you please provide a complete code sample that compiles?