Enterprise APP
html/text 컴포넌트 width사이즈 값 계산 본문
var agTYHTML:Label = new Label();//TextArea, Text...
var str:String = StringUtil.substitute("<font size='-1'>최저연령 기준으로 <b>{0}</b>께서는 <b><font color='0x9b1b6c'>{1}</font></b>에 해당합니다.</font>", driverInfo.name, driverInfo.ageTY);
agTYHTML.htmlText = str;
agTYHTML.regenerateStyleCache( false );
var textMetrics:TextLineMetrics = agTYHTML.measureHTMLText(str);
var textWidth:int = textMetrics.width;
agTYHTML.width = textWidth + 15;
bottomTY.addElement(agTYHTML);
var str:String = StringUtil.substitute("<font size='-1'>최저연령 기준으로 <b>{0}</b>께서는 <b><font color='0x9b1b6c'>{1}</font></b>에 해당합니다.</font>", driverInfo.name, driverInfo.ageTY);
agTYHTML.htmlText = str;
agTYHTML.regenerateStyleCache( false );
var textMetrics:TextLineMetrics = agTYHTML.measureHTMLText(str);
var textWidth:int = textMetrics.width;
agTYHTML.width = textWidth + 15;
bottomTY.addElement(agTYHTML);
'Flex General > Tips' 카테고리의 다른 글
flex4 배경이미지 쉽게 지정하기 (0) | 2010.09.06 |
---|---|
팝업중앙정렬 (0) | 2010.09.06 |
List, ComboBox RollOver 롤오버 효과 끄기 (0) | 2010.08.14 |
DataGrid 여러 컬럼에서 같은 itemrenderer 사용하기 (0) | 2010.08.13 |
DataGrid 전체 다시 그리지 않고 데이터만 갱신하기 (1) | 2010.08.10 |
Comments