Jewel 文本输入在运行时禁用或只读

Jewel textinput disable or readonly at runtime

如何在运行时设置珠宝文本输入禁用/只读? 为什么我下面的代码不起作用?如何设置?

<j:TextInput id="txtCode"> 
   <j:beads> 
      <j:TextPrompt  prompt="Project Code" id="promptCode" /> 
      <j:StringValidator required="5" autoTrim="false" 
         requiredFieldError="Need more than 5 characters"/>                                 
       <j:Disabled/>                                 
   </j:beads> 
</j:TextInput> 


private function btnAdd_click(event:MouseEvent):void    
{   
   txtCode.beads[2]=false; 
}

谢谢, 合唱团

是的,你可以。如果你添加珠子 [1] 并开始操作 属性 "disabled" - true/false.

就足够了

[1] https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/Disabled.as

谢谢, 彼得