Flex中字符换行

flex中字符换行存在两种情况,要区别对待

1.在MXML中,要用  
  具体对照表  ISO Latin-1字符集(HTML实体对照)

如在toner中的tooltip

<mx:ProgressBar id="pb" mode="manual"
        labelPlacement="center" width="150" minimum="0" maximum="100" label="0%" fontWeight="normal" borderColor="0xFF0000"  toolTip="     red: 0%~33%  &#13;yellow: 33%~66% &#13; green: 66%~100% " />

2.在as中,则可以使用  /n,如

                    str = str+"Occur Time:";
                    str = str+DateUtil.toMinuteString(_lbl.ocuredTime)+"/n";

                    lblStatus.toolTip = str;

3.特殊情况,在chart中用到datatip的时候,在as3中仍然使用 &#13;

 

<chart:MyColumnChart  width="100%" height="100%"  id="myChart" maxColumnWidth="10" dataProvider="{responseAC}" showDataTips="true" dataTipFunction="dataTipFunction">

 

 

<textarea cols="50" rows="15" name="code" class="c-sharp"> private function dataTipFunction(item:HitData):String { // return null return &quot;Printer Name:&quot;+item.chartItem.item.printer.name+&quot; &quot;+&quot; &quot;+&quot;Paper Jam: &quot;+DateUtil.toMinuteString(item.chartItem.item.updateTime)+&quot; &quot;+&quot; &quot;+&quot;Ready: &quot;+DateUtil.toMinuteString(item.chartItem.item.recoverTime)+&quot; &quot;+&quot; &quot;+&quot;Response Time: &quot;+DateUtil.minutes2HourMinuteFullStr(item.chartItem.item.reponseTime); } </textarea>

你可能感兴趣的:(Flex中字符换行)