<?xml
version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
import
mx.core.UITextField;
use namespace mx_internal;
private function initApp():void{
var textField:TextField = label2.mx_internal::getTextField()
as UITextField;
textField.background
= true;
textField.backgroundColor
= 0xDA0000;
}
]]>
</mx:Script>
<mx:Label id="label1"
width="250" text="1234567890"
color="0xffffff" opaqueBackground="0xDA0000"/>
<mx:Label id="label2"
width="250" text="abcdefghijklmnopqrstuvwxyz" color="0xffffff"/>
</mx:Application>
자세히 보면 위라벨의 크기가 살짝 큽니다.
정확한 확인을 위해, 2번째 라벨에 opaqueBackground="0xffffff" 로 속성을 주겠습니다.
<mx:Label id="label1"
width="250" text="1234567890"
color="0xffffff" opaqueBackground="0xDA0000"/>
<mx:Label id="label2"
width="250" text="abcdefghijklmnopqrstuvwxyz" color="0xffffff"
opaqueBackground="0xffffff"/>
'ria > flex' 카테고리의 다른 글
| [Flex] Label 에 backgroundColor 변경하기, (0) | 2010/05/06 |
|---|---|
| [Flex, AIR] Sound 무한 loop (0) | 2010/04/22 |
| [Flex] Output folder를 변경할수 없을때,,,조치 방법 (0) | 2010/02/23 |
| [Flex] Convert String to Date (3) | 2009/06/25 |
| AdvancedDataGrid Sort Icon 안보이기 (0) | 2009/06/02 |
| Flex 에서 SecureAMF / HTTPS 사용하기 (0) | 2009/04/13 |




댓글을 달아 주세요