【问题标题】:FlexMobileProject, setStyle("textFormat",number) in textArea doesn't workFlexMobileProject,textArea 中的 setStyle("textFormat",number) 不起作用
【发布时间】:2012-07-25 12:13:09
【问题描述】:

我在 Flex 中创建动态TextArea,我想动态更改它的fontSize,但setStyle 不起作用。

这是我的代码:

var textArea:TextArea = new TextArea();  
textArea.id = "txtCreaTaskAnalysis" +contatoreNumeroTextAreaCreaTaskAnalysis;  
textArea.left = 140;  
textArea.right = 45;  
textArea.horizontalCenter = 47;  
textArea.height = 110;  
textArea.y = posizioneYTextArea;  
var tfor:TextFormat = new TextFormat();  
tfor.size= 25 ;  
textArea.setStyle("textFormat",tfor);  
textArea.text = tfor.size.toString();  
addElement(textArea);

我在buttonClickHandler 中有这段代码,但fontSize 没有改变。

请帮忙..

【问题讨论】:

    标签: android actionscript-3 flex-mobile


    【解决方案1】:

    尝试使用:

    textArea.setStyle("fontSize",25);
    

    我认为 TextArea 没有名为“textFormat”的样式。

    【讨论】:

      猜你喜欢
      • 2016-12-07
      • 2013-06-30
      • 1970-01-01
      • 1970-01-01
      • 2022-01-11
      • 1970-01-01
      • 1970-01-01
      • 2021-01-08
      • 1970-01-01
      相关资源
      最近更新 更多