How to use superscripting in flex?

前端 未结 2 827
清酒与你
清酒与你 2020-12-20 05:40

I want to add a label in flex to display m/s2 (read meters per second square). I would need to use superscripting for this.

I have tried out the following code whic

2条回答
  •  时光说笑
    2020-12-20 06:39

    I think you've to do something like this

    var xmlText:String = "" +
                         "m/s 2" +
                         "";
    
    var txtFlow:TextFlow = TextFlowUtil.importFromXML(xmlText);
    
    var richTxt:RichText = new RichText();
    richtxt.textFlow = txtFlow;
    

    I've not tested it so please excuse me of any compilation errors.

提交回复
热议问题