0
我在Catalyst中爲TextInput火花控件製作了自定義外觀。使用自定義皮膚調整Flex火花控件的大小
問題是,在Flash Builder的設計視圖中,我無法調整應用自定義外觀的TextInput控件的大小。我希望只能調整TextInput的長度,使其保持相同的字體指標和皮膚比例,因此我可以對短,中,長TextInput使用相同的外觀。
同樣,在運行時期間,我想將控件停靠在父容器的右側和/或底部,從而創建類似可調整大小的Web窗體。
我做了一個醜陋的,但簡單TextInput外觀的這個例子:
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009">
<fx:Metadata>[HostComponent(spark.components.TextInput)]</fx:Metadata>
<s:states>
<s:State name="normal"/>
<s:State name="disabled"/>
</s:states>
<s:Group x="0" y="0">
<s:Rect height="31" radiusX="5" width="182" x="0.5" y="0.5">
<s:stroke>
<s:SolidColorStroke caps="none" color="#000000" joints="miter" miterLimit="4" weight="1"/>
</s:stroke>
<s:fill>
<s:SolidColor color="#FF90CD"/>
</s:fill>
</s:Rect>
<s:RichEditableText color="#2B4381" fontFamily="Arial" fontSize="12" tabStops="S0 S50 S100" x="11" y="11" width="161" heightInLines="1" id="textDisplay"/>
</s:Group>
</s:Skin>
我首先想到的是,它是通過使用9分片進行,但找不到任何例子。
由於提前, 斯托
感謝韋德,它的工作原理!現在我清楚地知道它是如何完成的。我可能讀了太多關於Adobe網站的限制,感到非常困惑。 – Arelena 2010-07-21 17:46:37
很高興聽到,很高興我能幫上忙。 – 2010-07-21 17:49:41