2015-05-12 37 views

回答

0

您需要設置樣式,如下圖所示:

<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"> 
    <fx:Style> 
     @namespace s "library://ns.adobe.com/flex/spark"; 
     @namespace mx "library://ns.adobe.com/flex/mx"; 

     s|TextArea#txtArea1 { 
      borderColor: red; 
     } 

    </fx:Style> 
    <fx:Declarations> 
     <!-- Place non-visual elements (e.g., services, value objects) here --> 
    </fx:Declarations> 
    <s:TextArea id="txtArea1" width="500" height="500" skinClass="MyCustomTextAreaSkin"> 

    </s:TextArea> 
</s:Application> 

如果您有其他的要求,以及隨後更好地與一個自定義皮膚去。這個例子輸出你想要的。

+0

我已經接受了您的答案,但它也適用於內聯。內聯的問題是它不會在自動完成中顯示。 –

0

由於某些原因,編譯器不知道這個樣式屬性。它不像其他樣式那樣自動完成,但它也不會引發錯誤。它似乎在運行時工作。

相關問題