0

スキンを使用してパネルのグラデーション背景色を設定しようとしています。コードを変更しようとしましたが、何も変わっていないようです。何をすべきかわからない。返信ありがとうございます。

私のスキンファイル

/<!-- layer 2: background fill --/>
        <!--- Defines the appearance of the PanelSkin class's background. -->
        <s:Rect id="background" left="1" top="1" right="1" bottom="1">
            <s:fill>
                <!--- @private
    Defines the  PanelSkin class's background fill. The default color is 0xFFFFFF. -->
            <s:SolidColor id="backgroundFill" color="red"/>  //Change to red but                 
                                                            //nothing happen....
            </s:fill>
        </s:Rect>
4

2 に答える 2

2

試す :

        <s:fill>
        <s:SolidColor color="0xFF0000"/>
    </s:fill>

編集:

    <s:Rect id="background" left="1" top="1" right="1" bottom="1">
    <s:fill>
        <s:SolidColor id="backgroundFill" color="0xFF0000"/>                
    </s:fill>
</s:Rect>

上記のコードを試しました。それはうまくいきます。

于 2010-06-11T02:01:47.377 に答える
1

私も同じ問題を抱えていました。

解決策は、オーバーライドされた updateDisplayList 関数の行を削除することです。 backgroundFill.color = getStyle("backgroundColor");

たぶん、他の検索者に役立つかもしれません。:)

于 2010-10-07T13:36:29.080 に答える