0
我不能讓我的TextArea採取我在下面的mxml皮膚文件中做的焦點皮膚。誰能幫我這個。請注意,在我的應用程序的css文件中,我已經指定了焦點皮膚:focus-skin:ClassReference(「skins.focusSkin」);FB4 TextArea焦點皮膚
皮膚文件代碼:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import spark.components.supportClasses.SkinnableComponent;
private var _target:SkinnableComponent;
public function get target():SkinnableComponent
{
return _target;
}
public function set target(value:SkinnableComponent):void
{
_target = value;
if (_target.skin)
_target.skin.addEventListener(FlexEvent.UPDATE_COMPLETE,
skin_updateCompleteHandler, false, 0, true);
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
this.setActualSize(target.width, target.height);
super.updateDisplayList(target.width, target.height);
}
private function skin_updateCompleteHandler(event:Event):void
{
invalidateDisplayList();
}
]]>
</fx:Script>
<s:BitmapImage id="focusGroup" source="@Embed(source='mySkinFile.swf', symbol='mySymbol')" />
</s:Group>