简体   繁体   中英

flex 4 textinput skin background color

I'm trying to change the background color on a textinput component in flex 4. I've been able to change some of the appearance by messing with the canned code flash builder generates for the sparkskin but for some reason, background does nothing.

I'm just trying to make the background black. I changed the background color but it's not working:

<!-- fill -->
<!--- Defines the appearance of the TextInput component's background. -->
<s:Rect id="background" left="1" right="1" top="1" bottom="1">
    <s:fill>
        <!--- @private Defines the background fill color. -->
        <s:SolidColor id="bgFill" color="0x000000" />
    </s:fill>
</s:Rect>

Take a look at line:

    /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
    static private const contentFill:Array = ["bgFill"];

So remove id as far as it isn't needed in your case:

<s:Rect id="background" left="1" right="1" top="1" bottom="1">
    <s:fill>
        <!--- @private Defines the background fill color. -->
        <s:SolidColor color="0x000000" />
    </s:fill>
</s:Rect>

And remove the line listed above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM