开发者

How to skin a (single) Spark Component to look like an MX Components

开发者 https://www.devze.com 2023-04-12 10:09 出处:网络
Question I want to use a Spark ComboBox with numerous MX Components but the Spark ComboBox does not look the same as the MX Components.Is there a skin I can use to Skin Spark components like MX compo

Question

I want to use a Spark ComboBox with numerous MX Components but the Spark ComboBox does not look the same as the MX Components. Is there a skin I can use to Skin Spark components like MX components?


Example

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <s:VGroup>
        <s:HGroup>
            <s:Label text="SPARK: "/>
            <s:ComboBox 
                dataProvider="{...}"
                labelField="label"
             开发者_StackOverflow   />
        </s:HGroup>
        <s:HGroup>
            <s:Label text="MX: "/>
            <mx:ComboBox
                dataProvider="{...}"
                labelField="label"
                />
        </s:HGroup>
    </s:VGroup>
</s:Application>

Neither Open:

How to skin a (single) Spark Component to look like an MX Components

Spark Open:

How to skin a (single) Spark Component to look like an MX Components

MX Open:

How to skin a (single) Spark Component to look like an MX Components

Ideally I would like to skin the Spark Component to look identical to the MX Component.


Read about using themes.
You need a halo theme. Halo.swc can be found at ${FLEX_SDK_FOLDER}/frameworks/themes/Halo. So pass the following parameter to compiler: -theme ${FLEX_SDK_FOLDER}/frameworks/themes/Halo/Halo.swc

0

精彩评论

暂无评论...
验证码 换一张
取 消